Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
sumif for multi conditions. i.e sumif(A1:A10,"Jon" and B1:B10,"A" | Excel Worksheet Functions | |||
Help with SUMIF | Excel Discussion (Misc queries) | |||
Embedding a Sumif in a sumif | Excel Worksheet Functions | |||
nested sumif or sumif with two criteria | Excel Worksheet Functions | |||
SUMIF - Range name to used for the "sum_range" portion of a SUMIF function | Excel Worksheet Functions |