Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Sum multiple cells if a column has a certain number in it

I am trying to sum multiple cells if a number is in another cell. I have a
spreadsheet in which I have assigned numbers to each employees type of work
(ranging from 1 to 15) in column A and H. So if Column A has a 2, I need it
to take the value from that row in column F and add it to other number 2 job
duties. Trying to make an executive summary of the amount of time people work
on certain job functions/projects. I would also need it to add the same
number 2 job functions found in Column H taking the number of hours in the
row in column M. Hope that makes sense.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 123
Default Sum multiple cells if a column has a certain number in it

Sumif would work for you.
The function would look like this for employee number 1:
=SUMIF(A2:F10000,1,F2:F10000)

You can see that the first argument is the range of data, the second
is the thing you are targeting, and the third is the range that should
be summed.

On Oct 18, 10:31*am, Cloughitup
wrote:
I am trying to sum multiple cells if a number is in another cell. I have a
spreadsheet in which I have assigned numbers to each employee’s type of work
(ranging from 1 to 15) in column A and H. So if Column A has a 2, I need it
to take the value from that row in column F and add it to other number 2 job
duties. Trying to make an executive summary of the amount of time people work
on certain job functions/projects. I would also need it to add the same
number 2 job functions found in Column H taking the number of hours in the
row in column M. Hope that makes sense.


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,393
Default Sum multiple cells if a column has a certain number in it

=SUMIF(A1:A100,2,F1:F100)
will sum all the F values when the corresponding A value is 2

=SUMIF(A1:A100,Z1,F1:F100)
will sum all the F values when the corresponding A value is the same as the
value in Z1

If you wish to sum with more than one criteria (test) you can:
1) use SUMIFS if you are working in Excel 2007
or
2) use SUMPRODUCT (in any Excel version)
For more details on SUMPRODUCT
Bob Phillips
http://www.xldynamic.com/source/xld.SUMPRODUCT.html
J.E McGimpsey
http://mcgimpsey.com/excel/formulae/doubleneg.html

best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"Cloughitup" wrote in message
...
I am trying to sum multiple cells if a number is in another cell. I have a
spreadsheet in which I have assigned numbers to each employee's type of
work
(ranging from 1 to 15) in column A and H. So if Column A has a 2, I need
it
to take the value from that row in column F and add it to other number 2
job
duties. Trying to make an executive summary of the amount of time people
work
on certain job functions/projects. I would also need it to add the same
number 2 job functions found in Column H taking the number of hours in the
row in column M. Hope that makes sense.



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Sum multiple cells if a column has a certain number in it

How would I add both together? Meaning the =SUMIF(A1:A100,2,F1:F100), worked
but I also want it to add the =SUMIF(H1:H100,2,M1:M100), all in one cell.
Would it be =SUMIF(A1:A100,2,F1:F100)+(H1:H100,2,M1:M100)? Itried that but it
did not work.

"Bernard Liengme" wrote:

=SUMIF(A1:A100,2,F1:F100)
will sum all the F values when the corresponding A value is 2

=SUMIF(A1:A100,Z1,F1:F100)
will sum all the F values when the corresponding A value is the same as the
value in Z1

If you wish to sum with more than one criteria (test) you can:
1) use SUMIFS if you are working in Excel 2007
or
2) use SUMPRODUCT (in any Excel version)
For more details on SUMPRODUCT
Bob Phillips
http://www.xldynamic.com/source/xld.SUMPRODUCT.html
J.E McGimpsey
http://mcgimpsey.com/excel/formulae/doubleneg.html

best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Sum multiple cells if a column has a certain number in it

Its SUMIF + SUMIF, viz.:
=SUMIF(A1:A100,2,F1:F100) + SUMIF(H1:H100,2,M1:M100)
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:19,000 Files:362 Subscribers:62
xdemechanik
---

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 number of cells and total in one column, based on another column suffix Pierre Excel Worksheet Functions 5 October 31st 07 12:28 AM
Divide a number into multiple cells rhon101 Excel Discussion (Misc queries) 2 May 21st 06 06:43 AM
Multiple Column Index Number in VLookup GorillaBoze Excel Worksheet Functions 8 October 28th 05 05:06 PM
Add a number to multiple cells Matt Excel Discussion (Misc queries) 2 October 22nd 05 09:23 PM
INTRICATE PROBLEM- How to find multiple text,excluding "H", in a multiple range of cells, then replacing 0 with another number in another cell Tourcat Excel Worksheet Functions 1 February 8th 05 06:26 PM


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