sum of rows...

  • Thread starter Thread starter James
  • Start date Start date
J

James

i have a number of rows that i want to sum, the problem is that these rows
have formula's if there is no real value. is there a way to sum the actual
values and ignore the cells that have formula's?

for example, A1=5, A2=2, A3=, (formula), A4=1.

i get an #N/A. any suggestions?

TIA

James
 
If A3 housing a formula that returns #N/A, try...

=SUMIF(A1:A4,"<>#N/A")

instead of:

=SUM(A1:A4)
 
Perfect!

thank you!!!

Aladin Akyurek said:
If A3 housing a formula that returns #N/A, try...

=SUMIF(A1:A4,"<>#N/A")

instead of:

=SUM(A1:A4)
 
Hi James,
If you mean A3 has a formula like =IF("A" = D3,E3,"")
which would give you a #VALUE! error if you used
=A1+A2+A3+A4

you can use something in A5 like: =SUM(A1:A4)
or preferably so that you can insert more rows without having
to change your formula: =SUM(A1:OFFSET(A5,-1,0))

More on the reason for using offset in
Insert a Row using a Macro to maintain formulas
http://www.mvps.org/dmcritchie/excel/insrtrow.htm#offset
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top