formula help

K

kilroy

I could use some help in creating a statement that avoids the div/
error in the following formula

=SUM(((G4/G40)*J40)+((L4/G4)*J42)+((Q4/G41)*J41))

at any point G4,L4,Q4 could be a value of 0. G40,J40,J42,G41,J4
always have values.

I'd like the cell to show a value of 0 when there are not any value
for G4,L4,Q4

THANKS
 
C

Chip Pearson

Try something like

=IF(OR(G4=0,G40=0,G41=0),0,SUM(((G4/G40)*J40)+((L4/G4)*J42)+((Q4/
G41)*J41)))


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


kilroy said:
I could use some help in creating a statement that avoids the div/0
error in the following formula

=SUM(((G4/G40)*J40)+((L4/G4)*J42)+((Q4/G41)*J41))

at any point G4,L4,Q4 could be a value of 0. G40,J40,J42,G41,J41
always have values.

I'd like the cell to show a value of 0 when there are not any values
for G4,L4,Q4

THANKS!


------------------------------------------------

~~View and post usenet messages directly from http://www.ExcelForum.com/

~~Now Available: Financial Statements.xls, a step by step guide
to creating financial statements
 

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

Top