Formula to Sum cells below a target call
I have a single column of data. There are several occurences of the
text "PAX" and always there is a number in the cell below. Is there a simple formula I can use to sum all these numbers up? Tried a sumif but no luck. e.g. PAX 6 4 2 PAX 10 answer should be 16 |
Formula to Sum cells below a target call
One way:
=SUMIF(A1:A10,"Pax",A2:A11) Notice that the two ranges have the same number of cells, but the second range is offset by one row. ajnmx wrote: I have a single column of data. There are several occurences of the text "PAX" and always there is a number in the cell below. Is there a simple formula I can use to sum all these numbers up? Tried a sumif but no luck. e.g. PAX 6 4 2 PAX 10 answer should be 16 -- Dave Peterson |
Formula to Sum cells below a target call
With
A1:A100 containing various values, or blanks, and wherever the word "PAX" exists, there is a number in the next cell down. and you want to sum those numbers. Try this: B1: =SUMIF(A1:A100,"PAX",A2) Note: A2, in the formula above, is 1 cell below A1. Is that something you can work with? -------------------------- Regards, Ron Microsoft MVP (Excel) (XL2003, Win XP) "ajnmx" wrote in message ... I have a single column of data. There are several occurences of the text "PAX" and always there is a number in the cell below. Is there a simple formula I can use to sum all these numbers up? Tried a sumif but no luck. e.g. PAX 6 4 2 PAX 10 answer should be 16 |
Formula to Sum cells below a target call
Hi,
If the first instance of PAX is located in cell A1, another alternative is : =SUMIF(A1:A20,"PAX",OFFSET(A1,1,0)) so that, within the Offset, you can adjust as needed : 1 or 2 or 3 ... HTH |
All times are GMT +1. The time now is 07:47 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com