Hi All,
I want to be able to work out how many people have a birthday in each month based on 2 criteria
In column A i have people's birthdays, in column B i have a category e.g. Red, Blue, Green
Is there any way that i can work out how many people have a birthday in August who are in the Green group?
It doesn't matter what year they were born in just the month.
Thanks in advance
Hello Smurfy:
The SUMPRODUCT() function should wrok for you.
Type these dates in cells D1 through O1, 1/1/1900, 2/1/1900, 3/1/1900... You can use custom formatting ( mmm ) so the dates look like so, Jan, Feb, Mar…
Type the colors in cells C2, C3 and C4 respectively.
Paste this formula in cell D2 then copy down and across to cell O4.
Code:=SUMPRODUCT(--(MONTH($A$2:$A$1000)=MONTH(D$1)),--($B$2:$B$1000=$C2))
In the blue array used:
=IF(D2=C1:C31,IF(MONTH(B1:B31)=INDEX({1,2,3,4,5,6,7,8,9,10,11,12},MATCH(E2,I5:I16,0)),A1:A31,""),"")
It is a simple formula
This one is little complicated (brown array).
=INDEX(A1:A31,SMALL(IF(IF(D2=C1:C31,IF(MONTH(B1:B31)=INDEX({1,2,3,4,5,6,7,8,9,10,11,12},MATCH(E2,I5: I16,0)),A1:A31,""),"")="","",ROW()),ROW(1:31)))
I think u'll see difference between 'em when u see attached file
Note. Both of 'em are array formulas and need to be conbirmed w/CTRL+SHIFT+ENTER.
PS: Type the formula, then select 31 rows (coz u've got 31 names), press F2 then CTRL+SHIFT+ENTER.
Люди, питающие благие намерения, как раз и становятся чудовищами.
Regards, «Born in USSR»
Vusal M Dadashev
Baku, Azerbaijan
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks