VLOOKUP Want to accept "NA" or text as number 0

lisaspencer

New Member
Joined
Jul 20, 2020
Messages
21
Office Version
  1. 365
Platform
  1. MacOS
I have quite a few VLOOKUP tables connected in 1 spreadsheet and it all works fine.

I have one column formula that is basically =columnS - columnN
So the VLOOKUP formula is =IFERROR((VLOOKUP($A1,Database,19,FALSE)-VLOOKUP($A1,Database,14,FALSE))," ")

In columnS (vlookup row 19) are numbers(percentages) and the same in columnN (vlookup row 14) and it works out the difference between the two
But sometimes there is the text "NA" in columnN (vlookup row 14) and I want it to be counted as a 0 but when it is currently text it doesn't count it in the formula.
There are some blanks in columnN (vlookup row 14) too which is why the IFERROR is in front of the formula as I don't want them counted.

Can anyone help with my formula?
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Do you mean that if there is text in col N it should subtract 0 from col S?
 
Upvote 0
Do you mean that if there is text in col N it should subtract 0 from col S?
Yes. If there is 0 in colN the formula works, but if there is text the formula doesn't work. I have 10,000 lines in the VLOOKUP table so I can't go check every NA in colN. I tried replacing all the NA's in the column with the number 0 but it didn't work for some reason
 
Upvote 0
Yes. If there is 0 in colN the formula works, but if there is text the formula doesn't work. I have 10,000 lines in the VLOOKUP table so I can't go check every NA in colN. I tried replacing all the NA's in the column with the number 0 but it didn't work for some reason
Actually ignore me, i've made it work now
 
Upvote 0
Glad you've sorted it & thanks for the feedback.
But one way is
Excel Formula:
=IFERROR((VLOOKUP($A1,Database,19,FALSE)-N(VLOOKUP($A1,Database,14,FALSE)))," ")
 
Upvote 0

Forum statistics

Threads
1,215,222
Messages
6,123,704
Members
449,118
Latest member
MichealRed

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