View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.newusers
joeu2004 joeu2004 is offline
external usenet poster
 
Posts: 2,059
Default Using text in an IF statement?

On Jun 12, 9:44*pm, The Hun wrote:
A1 *= *a number or text
A2 *= *a number
A3 *= *A1*A2
If A1 is text, what is the correct IF statement
in A3 so I don't get #Value as the answer?


Depends on what result you want when A1 is text. One way:

=if(istext(A1), "", A1*A2)

Another way:

=n(A1)*A2

If you would like a numerical result when A1 __looks__ like a number,
but is actually text, try:

=if(iserror(A1*A2), "", A1*A2)