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.
Related
For example, I have a range cells:
Date Number
04/1/2019 A1
07/1/2019 A2
14/1/2019 -
15/1/2019 A1
02/2/2019 A3
07/2/2019 A1
and I want to count the amount of unique number in January, which is 2. What should I do? I am using anolder version of Excel, whcich does not support functions such as FILTER() and UNIQUE().
I have found a formula online:
{=SUM(IF(FREQUENCY(IF(data<>"", MATCH(data,data,0)),ROW(data)-ROW(data.firstcell)+1),1))}
which can count unique text values in a range which ignoring blank cells. However, I was unable to modify it to suit my usage, since it doesn't allow me to insert any criteria (such as date and ignore "-"). Most of the solution online involves functions such as FILTER() and UNIQUE(), which I am not able to use.
Slight modification of your attempt in D1, based on this handy website:
=SUM(--(FREQUENCY(IF((B2:B7<>"-")*(MONTH(A2:A7)=1),MATCH(B2:B7,B2:B7,0)),ROW(B2:B7)-ROW(B2)+1)>0))
Entered as array formula through CtrlShiftEnter
This boolean logic allows you to enter many more criteria if needed, such as YEAR if your dates can span more than the year 2019 and you need to filter on that too. Or include a check against empty values. It's very versatile.
I am trying to calculate values within a specific date range. The data I want to split between each month and the values: Successful, Incomplete and Failed.
I've tried pivot tables with this data but it doesn't work for me, also lacking pivot table excel experience. Formulas I'm more comfortable with.
I am using the following statement to at least get the total number of a value I add into it;
=COUNTIF('Jan 19'!$C$2:$C$1159,"Value")
Ex. If I put into the value "Successful" I get the total number of successful records.
I am looking into having a formula that I can input a specific month/date range (Jan, Feb, etc) and a value to get a count.
Ex. =Formula ((RangeOfData, "Value") AND (RangeOfData, (FromDate, ToDate))
I expect to the get the total number of a value(s) within a specific date range. If there isn't any data then the results would be blank or 0.
I'd use the formula COUNTIFS() as #cybernetic.nomad pointed in the comments so you can put more conditions on the COUNT:
=+COUNTIFS('Jan 19'!$B$2:$B$1159,">="&F3,'Jan 19'!$B$2:$B$1159,"<"&G3,'Jan 19'!$C$2:$C$1159,H3)
In the formula above I guessed the dates are in the COLUMN B, if not, you need to change it in the formula above.
To do that we should put the range we want to look at in a couple of cells where you would put the date range, in the example above:
F3 is the start date (if you want February of this year should be 1/2/2019).
G3 is the final date (if you want February of this year should be 1/3/2019).
H3 is where you can write "value", "successful" or any other string you are trying to count.
I'm trying to sum payments, paid within a year of the start date but my sumifs functions doesn't seem to work as desired. Any idea what needs to be tweaked?
=SUMIFS(C2:C11,B2:B11,">="&I3,B2:B11,"<="&K3,D2:D11,">="&B2:B11,D2:D11,"<="&E2:E11)
Excel Data:
Here is a SUMPRODUCT():
=SUMPRODUCT($C$2:$C$11*($B$2:$B$11>=I3)*($B$2:$B$11<=K3)*($D$2:$D$11>=$B$2:$B$11)*($D$2:$D$11<=$E$2:$E$11))
The SUMPRODUCT, will iterate through the range and do the comparisons. If all the Boolean arguments resolve to true then the value of C at that row will be added.
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()))
Here's what I'm looking for....
Trying to Sum the count of worksheet 'Results 2013' column G items
IF Cell A matches "Canada"
IF Cell E (date) is July
Having trouble with the date portion of the SUMIFS statement below.
SUMIFS('Results 2013'!$G$2:$G$510,'Results 2013'!$A2:$A$510
,"=Canada",'Results 2013'!$E2:$E510,MONTH('Results 2013'!$E2:$E510)=7)
Example value of "Results 2013"$E$480 is
I try this formula, and it provides back "January" which is obviously incorrect.
=TEXT(MONTH('Results 2013'!$E$480),"mmmm")
However, this formula, results in TRUE or 1
=IF(MONTH('Results 2013'!$E$480)=7,1,0)
The simplest solution is to add a column Month using the MONTH function to compute values, and then refer to this new column in SUMIFS.
This tests whether the date values in column E fall within the range 7/1/2013 and 7/31/2013. If your dates all fall within 2013, it will work.
SUMIFS('Results 2013'!$G$2:$G$510,'Results 2013'!$A2:$A$510,"=Canada",
'Results 2013'!$E2:$E510,">="&DATE(2013,7,1),
'Results 2013'!$E2:$E510,"<="&DATE(2013,7,31))
This array formula will work with the more general case of dates falling within any year:
=SUM(G2:G510*(A2:A510="Canada")*(MONTH(E2:E510)=7))
You could use an array formula , then you can use month on the entire column:
{SUM(if('Results 2013'!$A2:$A$510="Canada",1,0)*if(MONTH('Results 2013'!$E2:$E510)=7,'Results 2013'!$G$2:$G$510,0))}
just remember to use ctrl+shift+enter rather than the usual enter to finish the formula