#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 24
Default sumif???

If column A contains names of colors (A1=orange, A2=yellow, A3=orange, etc)
and column B contains numbers (B1=3, B2=7, B3=8, etc.), can I create a
formula to sum all numbers in column B whose corresponding color in column A
is "orange"? For example, A1 and A3 are "orange", so the formula delivers
"11", the sum of B1 (3) and B2 (8).

Thanks.
--
Jeanette
  #2   Report Post  
Posted to microsoft.public.excel.misc
Ian Ian is offline
external usenet poster
 
Posts: 238
Default sumif???

The Excel help on SUMIF explains exactly what you need to do and shows an
example. In your case you need =SUMIF(A1:A100,"orange",B1:B100). You may
need to amend the row range. It doesn't matter what cell you put the formula
in, as long as it isn't in one of the ranges in the formula.

--
Ian
--
"Jeanette" wrote in message
...
If column A contains names of colors (A1=orange, A2=yellow, A3=orange,
etc)
and column B contains numbers (B1=3, B2=7, B3=8, etc.), can I create a
formula to sum all numbers in column B whose corresponding color in column
A
is "orange"? For example, A1 and A3 are "orange", so the formula delivers
"11", the sum of B1 (3) and B2 (8).

Thanks.
--
Jeanette



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 24
Default sumif???

Gee, I feel stupid. I didn't understand the difference between "range" and
"sum range" before. Now I do. Many thanks, Ian.
--
Jeanette


"Ian" wrote:

The Excel help on SUMIF explains exactly what you need to do and shows an
example. In your case you need =SUMIF(A1:A100,"orange",B1:B100). You may
need to amend the row range. It doesn't matter what cell you put the formula
in, as long as it isn't in one of the ranges in the formula.

--
Ian
--
"Jeanette" wrote in message
...
If column A contains names of colors (A1=orange, A2=yellow, A3=orange,
etc)
and column B contains numbers (B1=3, B2=7, B3=8, etc.), can I create a
formula to sum all numbers in column B whose corresponding color in column
A
is "orange"? For example, A1 and A3 are "orange", so the formula delivers
"11", the sum of B1 (3) and B2 (8).

Thanks.
--
Jeanette




  #4   Report Post  
Posted to microsoft.public.excel.misc
Ian Ian is offline
external usenet poster
 
Posts: 238
Default sumif???

Glad to help. Thanks for the feedback.

--
Ian
--
"Jeanette" wrote in message
...
Gee, I feel stupid. I didn't understand the difference between "range"
and
"sum range" before. Now I do. Many thanks, Ian.
--
Jeanette


"Ian" wrote:

The Excel help on SUMIF explains exactly what you need to do and shows an
example. In your case you need =SUMIF(A1:A100,"orange",B1:B100). You may
need to amend the row range. It doesn't matter what cell you put the
formula
in, as long as it isn't in one of the ranges in the formula.

--
Ian
--
"Jeanette" wrote in message
...
If column A contains names of colors (A1=orange, A2=yellow, A3=orange,
etc)
and column B contains numbers (B1=3, B2=7, B3=8, etc.), can I create a
formula to sum all numbers in column B whose corresponding color in
column
A
is "orange"? For example, A1 and A3 are "orange", so the formula
delivers
"11", the sum of B1 (3) and B2 (8).

Thanks.
--
Jeanette






  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 53
Default sumif???

You can also use:
=sumproduct(--(a1:a10="yellow")*(B1:b10))
Thanks

"Jeanette" wrote:

Gee, I feel stupid. I didn't understand the difference between "range" and
"sum range" before. Now I do. Many thanks, Ian.
--
Jeanette


"Ian" wrote:

The Excel help on SUMIF explains exactly what you need to do and shows an
example. In your case you need =SUMIF(A1:A100,"orange",B1:B100). You may
need to amend the row range. It doesn't matter what cell you put the formula
in, as long as it isn't in one of the ranges in the formula.

--
Ian
--
"Jeanette" wrote in message
...
If column A contains names of colors (A1=orange, A2=yellow, A3=orange,
etc)
and column B contains numbers (B1=3, B2=7, B3=8, etc.), can I create a
formula to sum all numbers in column B whose corresponding color in column
A
is "orange"? For example, A1 and A3 are "orange", so the formula delivers
"11", the sum of B1 (3) and B2 (8).

Thanks.
--
Jeanette




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
sumif for multi conditions. i.e sumif(A1:A10,"Jon" and B1:B10,"A" Harry Seymour Excel Worksheet Functions 9 June 12th 07 10:47 PM
Need help with SUMIF nander Excel Discussion (Misc queries) 3 February 23rd 06 10:45 PM
Embedding a Sumif in a sumif C.Pflugrath Excel Worksheet Functions 5 August 31st 05 07:31 PM
nested sumif or sumif with two criteria dshigley Excel Worksheet Functions 5 April 5th 05 03:34 AM
SUMIF - Range name to used for the "sum_range" portion of a SUMIF function Oscar Excel Worksheet Functions 2 January 11th 05 11:01 PM


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