#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 122
Default Moving range?

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!!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default Moving range?


Not much detail but something like for dates in col A 3=march

=sumproduct((month(a2:a22)=3)*(month(a2:a22)=10)*b 2:b22)
--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"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!!


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default Moving range?

Are you sure? Wouldn't that always be zero? A cell in column A can't be 3
and 10 at the same time.
--
David Biddulph

"Don Guillett" wrote in message
...

Not much detail but something like for dates in col A 3=march

=sumproduct((month(a2:a22)=3)*(month(a2:a22)=10)*b 2:b22)
--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"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!!




  #4   Report Post  
Posted to microsoft.public.excel.misc
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!!


  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 695
Default Moving range?

=SUM(INDIRECT(ADDRESS(2,MATCH(A1,B1:M1,0)+1)&":"&A DDRESS(2,MATCH(A2,B1:M1,0)+1)))



"Fred Smith" skrev:

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!!


.

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 122
Default Moving range?

On Dec 23, 9:08*pm, excelent
wrote:
=SUM(INDIRECT(ADDRESS(2,MATCH(A1,B1:M1,0)+1)&":"&A DDRESS(2,MATCH(A2,B1:M1,0)+1)))

"Fred Smith" skrev:

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!!


.


Thanks Fred, That worked great.
  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 122
Default Moving range?

On Dec 23, 9:08*pm, excelent
wrote:
=SUM(INDIRECT(ADDRESS(2,MATCH(A1,B1:M1,0)+1)&":"&A DDRESS(2,MATCH(A2,B1:M1,0)+1)))

"Fred Smith" skrev:

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!!


.


How do I make the formula look for data on another sheet in the same
workbook? My a1 and b1 are on one sheet and the b1:m1 and data is on
another.
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Moving a range name AND Contents JMay Excel Discussion (Misc queries) 2 August 3rd 09 04:31 AM
CODE 4 MOVING WITHIN A RANGE-TAB FARAZ QURESHI Excel Discussion (Misc queries) 0 December 5th 07 10:23 AM
MOVING DATE RANGE ON A CHART Drew Charts and Charting in Excel 1 August 3rd 06 02:45 AM
sum with moving range snax500 Excel Discussion (Misc queries) 3 July 10th 06 05:56 AM
formula with moving range sctroy Excel Discussion (Misc queries) 2 November 11th 05 03:20 AM


All times are GMT +1. The time now is 12:53 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"