Thread: Moving range?
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Fred Smith[_4_] Fred Smith[_4_] is offline
external usenet poster
 
Posts: 2,389
Default Moving range?

If you truly have the words "March" and "October" in a1 and a2, you're not
going to get any formulas to work.

You need either dates or month numbers (not names). Dates work best because
you can format them to your liking (such as displaying only the month name).

When a1:a2 and b1:m1 have numbers (or dates) in them, use:
=sumproduct(--(b1:m1=a1),--(b1:m1<=a2),--(b2:m2))

Regards,
Fred

"wx4usa" wrote in message
...
I have Months in B1:M1.
Dollars in B2:M2

I need a formula to return the sum dollars of a range of consecutive
months that is variable such as.....start month is in cell a1 and end
month is in a2. a1=March a2=October

Thank you so much for your help!!