A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Moving range?



 
 
Thread Tools Display Modes
  #1  
Old December 23rd, 2009, 09:59 PM posted to microsoft.public.excel.misc
wx4usa
external usenet poster
 
Posts: 121
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  
Old December 23rd, 2009, 10:16 PM posted to microsoft.public.excel.misc
Don Guillett
external usenet poster
 
Posts: 6,167
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  
Old December 23rd, 2009, 10:25 PM posted to microsoft.public.excel.misc
David Biddulph
external usenet poster
 
Posts: 8,714
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  
Old December 23rd, 2009, 11:42 PM posted to microsoft.public.excel.misc
Fred Smith[_4_]
external usenet poster
 
Posts: 2,386
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  
Old December 24th, 2009, 03:08 AM posted to microsoft.public.excel.misc
excelent
external usenet poster
 
Posts: 388
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  
Old December 26th, 2009, 04:29 PM posted to microsoft.public.excel.misc
wx4usa
external usenet poster
 
Posts: 121
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  
Old December 26th, 2009, 05:28 PM posted to microsoft.public.excel.misc
wx4usa
external usenet poster
 
Posts: 121
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.
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


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


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