Scotty:
=IF(R3="Dan W",SUMPRODUCT(--(MONTH(Y1)=MONTH('Profit Breakdown'!A5:A26)),'Profit Breakdown'!B5:B26),IF(R3="Paul P",SUMPRODUCT(--(MONTH(Y1)=MONTH('Profit Breakdown'!M5:M26)),'Profit Breakdown'!N5:N26),""))
Villareal:
=IF(R3="Dan W",SUMIF('Profit Breakdown'!A5:A26,Y1,'Profit Breakdown'!B5:B26),IF(R3="Paul P",SUMIF('Profit Breakdown'!M5:M26,Y1,'Profit Breakdown'!N5:N26),0))
Thanks Scotty and Villareal, I've managed to get both of yours adapted and working (as above), but having a problem with my date formats. Both Y1 and the Range A5:A26 are in "mmm-yy"
format, but even though the dates in the range display as:
Sep-10
Oct-10
Nov-10
Dec-10
Jan-11
...
Aug-11 etc...
the actual date displayed in the formula bar is:
10/09/2010
10/10/2010
10/11/2010
10/12/2010
...
10/08/2011 etc...
If i put the date in Y1 as 23/11/11 (a date which does not exist in A5:A26 as we havent reached that month yet and therefore does not have a corresponding value in B5:B26) it returns the value
for Nov-10. It should return 0 for Nov-11 as it is empty.
Any ideas why this is? Do I need to simplify the date format to just Months/Years?
Dan