disregard a cell on occasion when there is text in it instead of V

G

Guest

Hi

in the following simple formula =(C8*C$6)+(D8*$D$6)+(E8*$E$6)+(F8*$F$6)

sometime the value in the cell c8 or d8 or e8 or f8 is actually a letter(
because of a special requirement), of course I get en error when that happen.
I do not want to remove the cell from the formula everytime because I will
input number sometime in that cell.

I looking to keep the same formulas but with something to disregard the
text value when required or take the number value when there is one in the
cell.

So that way I can copy the formula whitout having the worry about editing
everytime


Thanks in advanced

Gilles
 
G

Guest

You can build =ISNUMBER() into your formula.
But that would mean having it in there 8 times. It is workable but
=(IF(ISNUMBER(C8),C8,0)*IF(ISNUMBER(C$6),C$6,0)+ ...
quite a long formula.

How about having another row (9) with this
=IF(ISNUMBER(C8),C8,0) etc

Then do your working out against this row instead.
Or you can write out the whole isnumber piece if you can be bothered.
 
D

Dave Peterson

I think that this is what =sumproduct() was intended for:

=SUMPRODUCT(C$6:F$6,C8:F8)
 
G

Guest

This is kinda brute force, but should do the job..........

=IF(ISNUMBER(C8),C8*C$6,0)+IF(ISNUMBER(D8),D8*D$6,0)+IF(ISNUMBER(E8),E8*E$6,0)+IF(ISNUMBER(F8),F8*F$6,0)

All on one line, watch out for word-wrap when copying..........

hth
Vaya con Dios,
Chuck, CABGx3
 
G

Guest

hi

that did the job

Thank you very much

CLR said:
This is kinda brute force, but should do the job..........

=IF(ISNUMBER(C8),C8*C$6,0)+IF(ISNUMBER(D8),D8*D$6,0)+IF(ISNUMBER(E8),E8*E$6,0)+IF(ISNUMBER(F8),F8*F$6,0)

All on one line, watch out for word-wrap when copying..........

hth
Vaya con Dios,
Chuck, CABGx3
 
G

Guest

You're very welcome.........and thanks for the feedback.

Vaya con Dios,
Chuck, CABGx3
 

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