Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 9
Default sum with multiple arguments

I want to add the values of all of the cells from another table, up until the
date selected. To explain, I have a table with values for each month of the
year and would like to add all of the figures together to get the total on a
seperate summary worksheet. That is not the problem. But how do I tell the
computer to only add up certain cells, say from january until may, even
though I have data going until september? I was hoping i could do this with a
lookup function (i.e. =sum('Sheet 1'!b23:hlookup(E2,'sheet 1'!A12:N27,12,
false) - where sheet 1 has the values in row 23 - 12 rows down from the names
of the months and cell e2= the month that i want the computer to sum up to
[may]) but this is not working. any suggestions.
please explain clearly - i am not so familiar with all of the functions.
Thanks for the help.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default sum with multiple arguments

=SUMPRODUCT((A12:A27={"Jan","Feb","Mar","Apr","May "})*(L12:L27))

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"hotelmasters" wrote in message
...
I want to add the values of all of the cells from another table, up until

the
date selected. To explain, I have a table with values for each month of

the
year and would like to add all of the figures together to get the total on

a
seperate summary worksheet. That is not the problem. But how do I tell

the
computer to only add up certain cells, say from january until may, even
though I have data going until september? I was hoping i could do this

with a
lookup function (i.e. =sum('Sheet 1'!b23:hlookup(E2,'sheet 1'!A12:N27,12,
false) - where sheet 1 has the values in row 23 - 12 rows down from the

names
of the months and cell e2= the month that i want the computer to sum up to
[may]) but this is not working. any suggestions.
please explain clearly - i am not so familiar with all of the functions.
Thanks for the help.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,339
Default sum with multiple arguments

Try:

=SUMPRODUCT(--MONTH(A1:A100)=1),(B1:B100))

Column A contains dates
Column B data to be summed

The above will sum data for January (assuming there is only one year)

=SUMPRODUCT(--MONTH(A1:A100)=3),(--MONTH(A1:A100)<=6),(B1:B100))

This will sum March to June inclusive

Change ranges to suit and you can put the constants in cells ...

=SUMPRODUCT(--MONTH(A1:A100)=E2),(B1:B100))


HTH

"hotelmasters" wrote:

I want to add the values of all of the cells from another table, up until the
date selected. To explain, I have a table with values for each month of the
year and would like to add all of the figures together to get the total on a
seperate summary worksheet. That is not the problem. But how do I tell the
computer to only add up certain cells, say from january until may, even
though I have data going until september? I was hoping i could do this with a
lookup function (i.e. =sum('Sheet 1'!b23:hlookup(E2,'sheet 1'!A12:N27,12,
false) - where sheet 1 has the values in row 23 - 12 rows down from the names
of the months and cell e2= the month that i want the computer to sum up to
[may]) but this is not working. any suggestions.
please explain clearly - i am not so familiar with all of the functions.
Thanks for the help.

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
Count occurances of multiple arguments TARS1 Excel Discussion (Misc queries) 6 July 19th 06 05:13 PM
Conditional Statement with Multiple Arguments swflorida77 Excel Worksheet Functions 2 July 1st 06 02:09 PM
Multiple Arguments - New Twist dansargeant Excel Worksheet Functions 2 March 10th 06 03:28 PM
Multiple Arguments dansargeant Excel Worksheet Functions 3 March 10th 06 08:06 AM
Multiple vlookup arguments ichall Excel Worksheet Functions 2 October 19th 05 10:47 PM


All times are GMT +1. The time now is 08:20 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"