excel-formula

Excel quits on Worksheet_Change Event

瘦欲@ 提交于 2020-01-06 15:59:25
问题 Can someone please point out what's wrong with this snippet of code? Every time a value is changed in the specified range (A1:B6), Excel simply quits with Microsoft Error Reporting dialogue. I am not allowed to uncheck 'Error Checking (Turn on background error checking)' in Excel Preferences. Private Sub Worksheet_Change(ByVal Target As Range) Dim KeyCells As Range Set KeyCells = Range("A1:B6") If Not Application.Intersect(KeyCells, Range(Target.Address)) Is Nothing Then Call Macro1 MsgBox

Formula to calculate days by month between two dates for future periods only

孤街醉人 提交于 2020-01-06 12:51:09
问题 Struggling to come up with a formula that works for this (Data in A1 - E4) StartDate EndDate Jan Feb Mar 12/4/2018 4/20/2019 31 28 31 9/26/2018 1/30/2019 30 0 0 1/1/2019 3/31/2019 31 28 31 1/1/2015 3/31/2019 155 141 155 IN Cell C2, formula is: =SUMPRODUCT(--(TEXT(ROW(INDIRECT($A2 & ":" & IF($B2="",TODAY(),B2))),"mmm")=C$1)) What I am trying to do is exclude past dates from the sum, for example in the 4th row, the Jan/Feb/Mar should be 31/28/31 and not count previous years. Any ideas where I

Sum of Overlapping DateTimes in Excel

徘徊边缘 提交于 2020-01-06 08:29:26
问题 I need to determine the total down time of my applications in excel - I only receive alerts of when they went up and down. My goal here is to notify my client of the total downtime, excluding overlaps in time, that there was an outage. For example, Application A was down from 1:30 to 2:30 and Application B was down from 2:00 – 2:30 then the total downtime would be 1 hour not 1.5 hours. Can someone help as I need an excel formula to do it? My raw uptime/downtime log is below. Thanks! Outage

Sum Up rows with the same name and value

删除回忆录丶 提交于 2020-01-06 08:10:11
问题 I have a table which looks like that: I want to sum up all the values which have the same name string and the same date, so that I get such a table: I have to say that I do not know how such a thing could be implemented. I tried something like an if...else structure, but what I am missing is the checking part of the other rows. Any suggestion how to implement such a problem? I appreciate your answer! 回答1: Try SUMIFS in E2 and drag it down: =SUMIFS($C$2:$C$10,$A$2:$A$10,A2,$B$2:$B$10,B2) 来源:

Sum Up rows with the same name and value

大兔子大兔子 提交于 2020-01-06 08:08:39
问题 I have a table which looks like that: I want to sum up all the values which have the same name string and the same date, so that I get such a table: I have to say that I do not know how such a thing could be implemented. I tried something like an if...else structure, but what I am missing is the checking part of the other rows. Any suggestion how to implement such a problem? I appreciate your answer! 回答1: Try SUMIFS in E2 and drag it down: =SUMIFS($C$2:$C$10,$A$2:$A$10,A2,$B$2:$B$10,B2) 来源:

AVERAGE from AVERAGEIFs that will ignore AVERAGEIFs where is ERROR EXCEL

给你一囗甜甜゛ 提交于 2020-01-06 07:56:15
问题 I am trying to calculate AVERAGE from five AverageIFs: AVERAGE(AVERAGEIFs1,AVERAGEIFs2,AVERAGEIFs3,AVERAGEIFs4,AVERAGEIFs5) in AverageIFs2 and AverageIFs4 I am receiving #DIV/0! . How to calculate AVERAGE from AverageIFs that are not have errors only? Adding IFERROR, IF(ISERROR) etc before AverageIf is not resolving problem. 回答1: It's rather tedious, but you might have to do something like this: =SUM(IFERROR(AVERAGEIFS(A1:A2,A1:A2,">"&0),0),IFERROR(AVERAGEIFS(B1:B2,B1:B2,">"&0),0),IFERROR

AVERAGE from AVERAGEIFs that will ignore AVERAGEIFs where is ERROR EXCEL

笑着哭i 提交于 2020-01-06 07:53:06
问题 I am trying to calculate AVERAGE from five AverageIFs: AVERAGE(AVERAGEIFs1,AVERAGEIFs2,AVERAGEIFs3,AVERAGEIFs4,AVERAGEIFs5) in AverageIFs2 and AverageIFs4 I am receiving #DIV/0! . How to calculate AVERAGE from AverageIFs that are not have errors only? Adding IFERROR, IF(ISERROR) etc before AverageIf is not resolving problem. 回答1: It's rather tedious, but you might have to do something like this: =SUM(IFERROR(AVERAGEIFS(A1:A2,A1:A2,">"&0),0),IFERROR(AVERAGEIFS(B1:B2,B1:B2,">"&0),0),IFERROR

Dynamic rotating work schedule excel

橙三吉。 提交于 2020-01-06 06:34:10
问题 I have a pretty tall order here everyone, I'm trying to make a rotating sanitation list for the remainder of the year for 3 teams. I want the sheet to auto assign team members job areas (Rooms;columns B,C,D) based on the days of the week the work. Members of Team 1 can only be assigned any Room Mon-Fri Members of Team 4 can only be assigned any Room Sat-Tues and are the preferred team for Sundays Members of Team 5 can only be assigned any Room Wed-Sat and are the preferred team for Saturdays

excel conditional formatting multiple functions

我们两清 提交于 2020-01-06 06:17:33
问题 I have a dynamic table with for example 5 columns: 1st column -> only has "AA" or "BB" strings. 2nd/5th column -> only has one letter values. I already have rules that: If a line has AA in the 1st column, it fills the line with color yellow. If a line has BB in the 1st column, it fills the line with color blue. I use this formula, and it works: =Search("AA"; $A1)>0 Now I want a rule that: If I find the letter M in the other columns, but it's on the AA line, the cell with M it's filled with

How to copy a cell & paste it to multiple cells in Excel VBA Macro

我只是一个虾纸丫 提交于 2020-01-06 05:56:06
问题 I want to copy the amount and paste it to all empty cells above the amount as shown in the picture , using VBA or Macro in MS Excel Edit: This is what I done it. Sub Macro2() Range("F5").Select Selection.Copy Range("F2:F4").Select ActiveSheet.Paste Range("F7").Select Application.CutCopyMode = False Selection.Copy Range("F6").Select ActiveSheet.Paste Range("F12").Select Application.CutCopyMode = False Selection.Copy Range("F8:F11").Select ActiveSheet.Paste End Sub This code only works on this