Multiple arguments in an if?

  • Thread starter Thread starter Aladin Akyurek
  • Start date Start date
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
 
Hi
try
=IF(AND(ISNUMBER($M$33),ISNUMBER($M$26),ISNUMBER($M$25)),"True
statement","False statement")
 
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
 
Hi Tim
not beautiful but try
=IF(ISERROR($M$33*$M$26*$M$25),"False","True")
 
Perhaps:

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

which will be FALSE if any of the addends is not a number.
 
[...]
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?
 
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

Similar Threads


Back
Top