Formula to Sum cells below a target call

  • Thread starter Thread starter ajnmx
  • Start date Start date
A

ajnmx

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
 
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.
 
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)
 
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
 
Back
Top