Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]()
I need to sum two cells based on an age table.
If A2 is between two values (ie 15 & 29 then add cell C2 & G2; 45 & 49 then add C7 & G2) There are 12 age bands. My brain has stopped working and I know there has to be an easy way to do this, but I'm not seeing it right now. Thanks |
#2
![]() |
|||
|
|||
![]()
Your question doesn't provide many details, so...
Assuming you have the lower numbers for each band in A2:A13, the higher numbers in B2:B13, and the values to be added to G2 in the C2:C13 range, then =SUMPRODUCT(--(A2:A13<=age),--(B2:B13=age),C2:C13)+G2 replace age with the address of the cell containing the age you are testing If you truly want to test for an age being BETWEEN the upper & lower limits, delete the equal signs "Betsey" wrote: I need to sum two cells based on an age table. If A2 is between two values (ie 15 & 29 then add cell C2 & G2; 45 & 49 then add C7 & G2) There are 12 age bands. My brain has stopped working and I know there has to be an easy way to do this, but I'm not seeing it right now. Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
SumIF function | Excel Discussion (Misc queries) | |||
SUMIF function | Excel Worksheet Functions | |||
SUMIF - Range name to used for the "sum_range" portion of a SUMIF function | Excel Worksheet Functions | |||
help with "criterea" in the sumif function | Excel Worksheet Functions | |||
how do you do a sumif function on more than one worksheet? | Excel Worksheet Functions |