Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I am trying to create a formula that if a range of cells contains a specific
value AND a range of cells in the next column contains a specific value, then the corresponding cells in the third column will be summed. What I have is below. It recognizes the formula as long as all the cells in the range of the first two columns contain the respective specific values. Can anyone suggest a corrected formula, so the values in the cell ranges can vary? Thanks! =(IF((AND(A2:A500="Value 1",B2:B500="Value 2")),SUM(C2:C500))) |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Chris,
Try this =SUMPRODUCT((A2:A500="Value1")*(B2:B500="Value2")* (C2:C500)) Mike "Chris" wrote: I am trying to create a formula that if a range of cells contains a specific value AND a range of cells in the next column contains a specific value, then the corresponding cells in the third column will be summed. What I have is below. It recognizes the formula as long as all the cells in the range of the first two columns contain the respective specific values. Can anyone suggest a corrected formula, so the values in the cell ranges can vary? Thanks! =(IF((AND(A2:A500="Value 1",B2:B500="Value 2")),SUM(C2:C500))) |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Here's another way:
=SUMPRODUCT(--(A1:A13="vijayawada1"),--(B1:B13="vijayawada2"),C1:C13) -- Ryan--- If this information was helpful, please indicate this by clicking ''Yes''. "Mike H" wrote: Chris, Try this =SUMPRODUCT((A2:A500="Value1")*(B2:B500="Value2")* (C2:C500)) Mike "Chris" wrote: I am trying to create a formula that if a range of cells contains a specific value AND a range of cells in the next column contains a specific value, then the corresponding cells in the third column will be summed. What I have is below. It recognizes the formula as long as all the cells in the range of the first two columns contain the respective specific values. Can anyone suggest a corrected formula, so the values in the cell ranges can vary? Thanks! =(IF((AND(A2:A500="Value 1",B2:B500="Value 2")),SUM(C2:C500))) |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I add a formula to a range of cells | New Users to Excel | |||
how to use the IF formula with a range of cells | Excel Discussion (Misc queries) | |||
Range of cells and division formula | Excel Discussion (Misc queries) | |||
Formula help for using a range of cells! | Excel Worksheet Functions | |||
Excel - formula to calculate colored fill cells within a range wi. | Excel Worksheet Functions |