IF statement

  • Thread starter Thread starter Darrell Edwards
  • Start date Start date
D

Darrell Edwards

I am trying to do an IF statement: =IF(F4>10,10,F4), that
works fine unless the user puts text into F4 instead of a
number. How do I correct it to allow them to put both
text and numbers? When they do put text into F4 I want to
return (0).

TFTH.
 
Darrell Edwards said:
I am trying to do an IF statement: =IF(F4>10,10,F4), that
works fine unless the user puts text into F4 instead of a
number. How do I correct it to allow them to put both
text and numbers? When they do put text into F4 I want to
return (0).

=MIN(10,N(F4))
 
Hi Darrel,

try,

=IF(ISTEXT(F4),0,IF(F4>10,10,F4))

Hope this helps!
 
Hi Frank,

I'm sure you meant ISTEXT and not ISNUMBER.

By the way, nice to see to back!
 
=min(10,f4)

=min() ignores cells with text.

Darrell said:
I am trying to do an IF statement: =IF(F4>10,10,F4), that
works fine unless the user puts text into F4 instead of a
number. How do I correct it to allow them to put both
text and numbers? When they do put text into F4 I want to
return (0).

TFTH.
 
Works perfect!
Now I have another formula =IF(F4>10,F4-10,0) that
references the formula that you just provide to me. =IF
(F4>10,F4-10,0) returns #value! how do I fix it?

Thanks
 
-----Original Message-----
....

I'd guess you meant

=IF(ISTEXT(F4),0,MIN(F4,10))

Hi Harlan
meant
=IF(ISNUMBER(F4),MIN(F4,10),0)

But using the N function (as shown in your example9 is
definetly better :-)
 
Dave Peterson said:
=min(10,f4)

=min() ignores cells with text.

And the formula above returns 10 rather than 0 because it does ignore text.
See OP's specs.
 
Now I have another formula =IF(F4>10,F4-10,0) that
references the formula that you just provide to me. =IF
(F4>10,F4-10,0) returns #value! how do I fix it?

=MAX(0,N(F4)-10)
 
Oops. I misread the question.



Harlan said:
And the formula above returns 10 rather than 0 because it does ignore text.
See OP's specs.
 

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

Similar Threads

if statement 2
sumproduct 2
conditions in if statements 1
Complex Autofill does not follow formula 4
IF function won't post cell values 2
f4 to make constant 5
What is wrong with this IF formula 7
Formula problem 3

Back
Top