help with adding... SUMIF formula?

P

ppaauull

I'm looking for a formula that will do the following:

A1-A12 contains numbers. and I want a formula that will add up whatever
number of cell I enter in B1

example: B1, I enter 6
the formula will add from A1 to A6
9 will add up A1-A9, etc...


sumif formula maybe? if anyone can help I'd appreciate it.

thanks!
 
B

Biff

Hi!

Try this:

=SUM(A1:INDEX(A1:A12,B1))

Note: if B1 is empty the entire range will be summed.

Biff
 
B

Bob Phillips

=SUM(A1:INDEX(A1:A12,B1))

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
P

ppaauull

brilliant!!

thanks you guys!

ended up using ths one..

=SUM(A1:INDEX(A1:A12,B1))

thanks again!
 
B

Bob Phillips

Good choice, non-volatile <G>

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
Top