Multiple arguments in an if?

T

Tim

I want to test for numeric values before I do some calculation. Something like:

IF(ISNUMBER($M$33,$M$16,$M$25).....

which doesn't work. What can I do?

Tim
 
F

Frank Kabel

Hi
try
=IF(AND(ISNUMBER($M$33),ISNUMBER($M$26),ISNUMBER($M$25)),"True
statement","False statement")
 
T

Tim

Frank said:
Hi
try
=IF(AND(ISNUMBER($M$33),ISNUMBER($M$26),ISNUMBER($M$25)),"True
statement","False statement")
Thanks gentlemen,

I was hoping for something a bit more concise, but I will work with what I must.

Tim
 
V

Vasant Nanavati

Perhaps:

=IF(ISNUMBER($M$33+$M$16+$M$25) ...

which will be FALSE if any of the addends is not a number.
 
A

Aladin Akyurek

[...]
Thanks gentlemen,

I was hoping for something a bit more concise, but I will work with what I must.

Tim

I suppose you still deem unnecessary to reveal that secret "some
calculation". Why?
 
H

Harlan Grove

Tim said:
....
I was hoping for something a bit more concise, but I will work with
what I must.

You want concise? Then consider

=IF(COUNT($M$33,$M$16,$M$25)=3,<TrueResult>,<FalseResult>)

If all of your cells were in a single area range, then you could use an
array formula involving AND(ISNUMBER(<range>)), but with your nonadjacent
arguments using COUNT and hardcoding the desired result (3) is the best you
could do. Also note that this only works when you're checking that they're
all numbers.
 

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