Sumif Statement

B

Ben

=SUMIF('SW LAST YEAR 02-03'!$B$2:$B$3875,$H$703,'SW LAST YEAR 02-03'!$G$2:$G$3875)

I have this formula above, $G$2:$G$3875 = the month of October, next month $H$2:$H$3875 will refer to November. I have a list box with the months of the year in it. What I am trying to do is when I click on the list box and change it to November, I would like the formula to automatically update from $G$2:$G$3875 to $H$2:$H$3875.

Can anyone help me????

Regards
Ben
 
J

Jason Morin

Try:=SUMIF('SW LAST YEAR 02-03'!$B$2:$B$3875,$H$703,INDIRECT("'SW LAST YEAR 02-03'!G"&VLOOKUP(A1,{"October","G";"November","H"},2,0)&"2:"&VLOOKUP(A1,{"October","G";"November","H"},2,0)&"3875")

where A1 is the validation cell

HT
Jaso
Atlanta, GA
 
B

Ben

Thanks for the response Jason.

A little complicated to understand but I've managed. If you have time to respond, could you run through step by step with the indirect statement. (ie. { }). So I can explain to people in future

Thanks agai

Ben
 
Top