#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default SUMIF and IF

I have two columns, one of text and one of numbers.

I'm trying to get a sum of the cells in column A if column B has a
particular text.

For Instance:

1 AAA
2 BBB
1 CCC
3 AAA

I need a formula that counts the value of the cells in column A when column
B says AAA.

Any suggestions?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,805
Default SUMIF and IF

Enter this in D1 with AAA or BBB in C1
=SUMPRODUCT(--(A1:A100),--(B1:B100=C1))
to get the sum
and
=SUMPRODUCT(--(B1:B100=C1))
to get the count

Change 100 to the end of your data set

to get count
--
Always provide your feedback...


"silversilver" wrote:

I have two columns, one of text and one of numbers.

I'm trying to get a sum of the cells in column A if column B has a
particular text.

For Instance:

1 AAA
2 BBB
1 CCC
3 AAA

I need a formula that counts the value of the cells in column A when column
B says AAA.

Any suggestions?

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,934
Default SUMIF and IF

The SUMIF function will give you that...

=SUMIF(B:B,"AAA",A:A)

although, if possible, I would restrict the ranges to the smallest size that
will accommodate your data, if at all possible; for example...

=SUMIF(B1:B100,"AAA",A1:A100)

assuming your data will always fit within that specified range.

--
Rick (MVP - Excel)


"silversilver" wrote in message
...
I have two columns, one of text and one of numbers.

I'm trying to get a sum of the cells in column A if column B has a
particular text.

For Instance:

1 AAA
2 BBB
1 CCC
3 AAA

I need a formula that counts the value of the cells in column A when
column
B says AAA.

Any suggestions?


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
Help with SUMIF sumitk Excel Discussion (Misc queries) 7 May 18th 06 04:49 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 12th 05 12:01 AM


All times are GMT +1. The time now is 10:48 AM.

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"