Stupid If statement question....

  • Thread starter Send Object Command - Two attachments
  • Start date
S

Send Object Command - Two attachments

I have a vlookup in one column that has results = #N/A

I need to do an if statement, that looks like:
If the field =#N/A, then 0, if not, the field.
Basically, I want to convert all of the #N/A's to a 0 (zero) in another
column....
 
P

PhilinLondon

You could copy and paste the results as values, then highlight the column and
'edit ' , 'replace' , find what = #N/A , replace with = 0
 
S

Send Object Command - Two attachments

I know I can that....however, I need to have this in a formula.
I need this done automatically.

Any other suggestions?

Thanks -
 
S

Sloth

=IF(ISNA(formula),0,formula)

replace formula with your formula, or the cell in question. you can also
use the following formula to account for any other type of error (#DIV/0 for
example).

=IF(ISERROR(formula),0,formula)
 
S

SIR Knight

I have ssumed that you have a formula that either gives a value or #N/A

To do what you want you need to refer to the error, not the result

=IF(ISERROR(cell ref),0,1)

If the cell you are pointing to results in an error (eg #N/A) then it
will give a value of 0, if no error found then it will give a value of
1

Hope this helps

Steve
 
S

Send Object Command - Two attachments

Worked like a charm - thansk to all.

Sloth said:
=IF(ISNA(formula),0,formula)

replace formula with your formula, or the cell in question. you can also
use the following formula to account for any other type of error (#DIV/0 for
example).

=IF(ISERROR(formula),0,formula)
 
Top