Help with #N/A result

easybpw

Active Member
Joined
Sep 30, 2003
Messages
439
Office Version
  1. 365
  2. 2013
Platform
  1. Windows
Hello and thanks in advance for your help. I'm using the below formula and it works as designed. However there are now times when the result of the formula will return a #N/A, which I don't want. My preferred result when this happens is it returns a -0-. I'm stumped on how to do it. I've tried adding an iferror statement but that doesn't work with the other parts of the formula. It does work when I am only using that as the formula. Hope that made sense. Below is what I have.

=IF(VLOOKUP("CRC",Adjustments!$I$4:$J$12,2,0)>0," ",-VLOOKUP("CRC",Adjustments!$I$4:$J$12,2,0))
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Are you doing this in Excel 2013 or 365 (you have both listed)?
Excel 365 has some new functions which makes things like this easier.
 
Upvote 0
Are you doing this in Excel 2013 or 365 (you have both listed)?
Excel 365 has some new functions which makes things like this easier.
Sorry, I use both, depending on if I'm at work or home. This is in 365.
 
Upvote 0
Excellent. Then we can take advantage of the new LET function.
See if this does what you want:
Excel Formula:
=LET(x,VLOOKUP("CRC",Adjustments!$I$4:$J$12,2,0),IF(ISERROR(x),"-0-",IF(x>0," ",-x)))
 
Upvote 0
Solution
Excellent. Then we can take advantage of the new LET function.
See if this does what you want:
Excel Formula:
=LET(x,VLOOKUP("CRC",Adjustments!$I$4:$J$12,2,0),IF(ISERROR(x),"-0-",IF(x>0," ",-x)))
Yes, works perfect. I should have clarified that -0- I really wanted $0.00 but that was an easy change for me. Thanks again.
 
Upvote 0
You are welcome.
Glad I was able to help!

Note that new LET function is really handy. With it, you don't need to repeat the same long formula in the same expression.
 
Upvote 0

Forum statistics

Threads
1,223,214
Messages
6,170,771
Members
452,353
Latest member
strainu

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top