#name error

E

Excel Experimenter

c10 = 40; d10 can be any number above or below 40. The formula I am using is
supposed to either read the number above or below 40 and read either # over
or # under, depending on which it is. For example, if c10=40 and d10=39.25
then e10 should read .75 under. If c10 and d10 are both forty then it would
read "at projection". Here is the formula:
=IF(OR(D11,C11),IF(D11-C11>0,STRING(D11-C11,2)&"over",IF(D11-C11<0,STRING(C11-D11,2)&"under","at projection"))," ")

However, if I put any number other than 40 in d10 I just get a #name error
displayed in the corresponding cell (e10)

Anybody have any ideas?
 
D

daddylonglegs

STRING isn't an excel function I know, that's probably causing your
error.

Try this formula

=IF(D10<>"",IF(D10=C10,"at
projection",TEXT(ABS(D10-C10),".00")&IF(D10>C10," over"," under")),"")
 
J

JMB

I don't believe excel has a STRING function, which causes the NAME error.
There is a CONCATENATE function or you can just use the apersand &

=IF(OR(D11<>"",C11<>""),IF(D11=C11,"at
projection",ABS(D11-C11)&(IF(D11>C11," over"," under"))),"")
 
W

Wigi

Hi

Just to add and hopefully clear the haze: VBA has a String function. Its
purpose is to repeat some string a chosen number of times.

Wigi
 

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