How do I modify the following to include to look a the current time and compare to named range.
=SUMIF(3:3,TODAY(),INDIRECT("a"&MATCH("total",A:A,0)):INDIRECT("z"&MATCH("total",A:A,0)))
I need determine the sum of values where column A value = "workingProgresssubtotal" and row 4(time)is <= current time for current date.
return sum(workingProgressSubtotal)
also repeat process the ColumnA = Total.
Note the number of rows will change on refresh, however the date and time rows will always be 3 &4 .
[embed=file 1052427]
To fix your pasted formula use this:
=SUMIF(3:3,"<="&TODAY(),INDIRECT("A" & MATCH("total",A:A,0)&":Z" &MATCH("total",A:A,0)))
From there you can probably intuit how to do what you want.
HERE IS MY FINAL SOLUTION - THANKS TO ALL WHO ASSISTED ME WITH THE ISSUE:
=SUMPRODUCT(INDIRECT("a"&MATCH("WorkInProgressSubtotal",A:A,0)):INDIRECT("z"&MATCH("WorkInProgressSubtotal",A:A,0)),--(A3:Z3<=TODAY()),--(A4:Z4<=NOW()-TODAY()))
Related
I wish to construct 2 current status columns so as find the last values in each row in Excel:
one for the last Date and the other for the last person who needs to act.
Please see the attached jpg To return the last values in a row for Date and Person to Act
I have tried to use the excel functions, namely, INDEX or LOOKUP but to no avail because of the 3 Remarks columns within the table.
I would appreciate it if you could advise me how to craft a VBA code to the above query.
From LC TAN 2020-02-13
You're on the right track.
you can use LOOKUP to return the last element in an array
BUT you have to ensure your array only has the elements that you want to consider
There is a variation of the INDEX function where you can enter an array for the column (or row) argument and return selected items. You enter the array, or arra constant, in a format like:
N(IF(1,*array or arrayConstant*))
So, a formula that would work for your requirements would be:
L6: =LOOKUP(2,1/LEN(INDEX($B6:$J6,N(IF(1,{2,5,8})))),INDEX($B6:$J6,N(IF(1,{2,5,8}))))
and fill down.
You can use MAX for the date to find the latest date in that row.
You can then use IFERROR and VLOOKUP to find the action with that date. i.e. lookup the date that MAX has returned in the first set of columns, and if that returns an error, look in the second. If the second returns an error, look in the third.
As per your sheet, the formula for L6 would be =MAX(B5:I5)
The formula for M6 would be =IFERROR(VLOOKUP(L5,B5:C5,2,FALSE),IFERROR(VLOOKUP(L5,E5:F5,2,FALSE),VLOOKUP(L5,H5:I5,2,FALSE)))
You can then drag the cells down to populate the date and action for every row. You could achieve the same with VBA if you wanted to, but I would have thought that this is the easiest way to get the the desired result.
After searching through hundreds of COUNTIFS questions, I can't find the answer, so please bear with me.
I want to count the number of projects where State=Completed AND Actual End Date is Less Than Planned Finish.
Data is as follows:
This statement works: =COUNTIFS(Table1[State],"Completed",Table1[Actual End Date],">0") (value = 75)
Changing the 2nd criteria though returns 0: =COUNTIFS(Table1[State],"Completed",Table1[Actual End Date],"<="&Table1[Planned Finish])
Actual value should be 31 (obtained via a helper column) but I'd like to avoid the helper column if possible - and I think that it is possible, I'm just not sure how to do so.
The criteria cannot be a range, it must be a single value. COUNTIFS will not work for that reason.
Use SUMPRODUCT:
=SUMPRODUCT((Table1[State]="Completed")*(Table1[Actual End Date]<=Table1[Planned Finish]))
I've tried using SUMIF to obtain my results but it doesn't work properly.
I have a row of dates (XX/XX/XXXX format) and I would like to check this row for the current date.
If the row contains the current date, then I would like to sum the total of that column and row 5-20.
For example - today is 10/13/2016. I would like to search for TODAY() in a certain row (Row 1 for example), and if TODAY() is found, then total this column from row 1 down to row 3.
--A-- --B--
10/13/2016 10/14/16
1 50 10
2 10 4
3 5 6
The result should be 65 only IF the date matches TODAY().
I've also checked on giving the column letter based on the date but with no luck.
Any tips are appeciated! Thank you.
I think you can achieve this with a simple IF and a SUM
i.e. in your example above if you want the result to appear on the bottom row you can just use:
=if(B2=today(), sum(B3:B5), "")
This will display the sum at the bottom of the column for columns where the date = today and a blank in the other columns
You need to use the OFFSET function. You can find the documentation here: https://support.office.com/en-us/article/OFFSET-function-C8DE19AE-DD79-4B9B-A14E-B4D906D11B66
In your particular example the following formula will work:
=SUM(OFFSET(D2, 1, MATCH(B2, $D$2:$F$2, FALSE) - 1, 20))
You can see the formula working below. Assuming you know what the SUM formula is doing, I will explain what the OFFSET formula is doing:
First Parameter: Says start at cell D2
Second Parameter: This is how many row up/down do you want to do. In your case you need start at row below the date so '1' it is.
Third Parameter: This is how many columns to the right do you want to
go. Well the number of columns you want to go is based upon where
your date is. So this uses the match formula to figure out how far
to the right to go.
Fourth Parameter: This is how many row do you want to include. I just picked 20 to include the 20 rows below the selected cell.
You obviously need to modify the parameters a little bit to fit your exact data shape.
So I'll give it a shot:
{=SUM(HLOOKUP(TODAY(),Table_With_Dates_and_Three_Rows_Cell_Reference,{2,3,4}))}
NB: Don't type {} but put the formula inside it and then hit Ctrl+Shift+Enter to create what is called an array formula (it does array calculations element by element then submits the aggregating function value---in this case that is sum).
this should be simple enough, but numbers (on OSX) keeps throwing an error about the ranges being different sizes.
I have a list of numbers, each with an associated date, and I want a sum of all numbers within a particular month (to give, on a separate sheet, a monthly total).
Here is what I've tried:
SUMIFS(
Sheet1::Table 1::D2:D84,
MONTH(Sheet1::Table 1::A2:A84), "=04",
YEAR(Sheet1::Table 1::A2:A84), "=2014"
)
Sorry if this is a stupid question, but I've tried fiddling with it and it just won't accept it.
Thanks in advance.
You cannot put a function inside the range:
=SUMIFS(C1:C25;Month(A1:A25);"=3")
than you need to add two (hidden?) columns with Month & year function.
After you build SUMIFS based on the new columns
=SUMIFS(C1:C25;D1:D25;"=4";E1:E25;"=2014")
sum all value from C1 to C25 if column of month (D) is equal to 4 and column of year (E) is equal to 2014.
I would suggest considering using a SUMIFS function with an upper\lower limit, and then either referencing a cell with the dates, or using their numerical value in the formula (the former is my preference, to reduce hard coded values = easily updated\reused). So something like:
=SUMIFS(D2:D84, A2:A84, ">="&E1, A2:A84, "<="&E2)
In this example:
column 'D' has the values you want to sum
column 'A' has the date values
columns 'B' and 'C' are treated as irrelevant (for the sake of this formula)
column 'E' has 2 values, in row 1, the lower limit (for this specific question, the first of April) and in row 2 the upper limit (for this specific question, the final day of April)
Then have your lower limit for dates (the first day from when you would like column 'D' to be counted) in cell E1, and your date upper limit in E2.
Easily updated for future months, so might save you some work down the line.
The next easier option would be to update it to be formatted as a table, because your formula would be slightly more legible, add in some named ranges (in this case, E1 = 'lowerlimit' and E2 = 'upperlimit) to once again make it easier to read the formula, in which case you'd end up with something like:
=SUMIFS(table[FigureToBeAccrued], table[dates], ">="&lowerLimit, table[dates], "<="&upperlimit)
Might've overcooked this answer, it's my first, so wanted to make sure I didn't skimp. Let me know if you've got any follow up questions.
I've got 3 columns as follows:
Boolean Value Date
Yes £3000 01-Jan-2012
No £3000 01-Jan-2012
No £3000 01-Nov-2012
Basically I just need to look at that table and come up with the total value for where Boolean is set to No, however only take those where the month is equal or less than the current month set by the computer time
Which version of Excel? In Excel 2007 and later try SUMIFS which allows you to sum with multiple conditions, i.e.
=SUMIFS(B2:B10,A2:A10,"No",C2:C10,"<="&TODAY())
I used cell references but you can used named ranges in their place like this:
=SUMIFS(Value,Boolean,"No",Date,"<="&TODAY())
or in earlier versions of Excel you can use SUMPRODUCT like this:
=SUMPRODUCT(B2:B10,(A2:A10="No")*(C2:C10<=TODAY()))
Use the DSUM function.
Criteria range would be
Boolean Month Check
No =MONTH(C2) < X
where C2 is the first data cell in column Date.