Mar 25 2022 02:37 PM - edited Mar 25 2022 03:07 PM
Can I use a logical function as "the value if true" part of an if statement? If so, what is the proper syntax to use?
I have data that has returned #n/a in its column - here is the formula: =IF((OR(M4<25,M4="#N/A")),0,-3)
I need M4, if its value is #N/A, to equal zero. M4 having a value of #N/A is from a VLOOKUP where some number's in the table array, are not in my "lookup value" sheet, so hence the #n/a value.
I want the #N/A results from the vlookup to show as zero in the formula listed above; I thought i may be able to use IFOR, but that seems not to work....
Mar 25 2022 02:59 PM
The answer is most probably yes, but if you provide more detailed information we'll be able to help you better.
Mar 25 2022 03:09 PM
Mar 25 2022 03:32 PM
You write "I need M4, if its value is #N/A, to equal zero."
You can do that by changing the formula in M4. It now looks like
=VLOOKUP(...)
Change it to
=IFERROR(VLOOKUP(...),0)
This can be filled down if required.
Mar 25 2022 07:05 PM