IFNA with VLOOKUP format

CiaoKarina

New Member
Joined
Oct 22, 2021
Messages
12
Office Version
  1. 365
Platform
  1. MacOS
Help! I have a VLOOKUP that is working perfectly until I try to address the #N/A.
The VLOOKUP references another workbook. When I recorded the macro it put " in front of the =(VLOOKUP....). What is this for? I think this is causing my problem.

Current macro:
Range("K1").Select
ActiveCell.FormulaR1C1 = _
"=(VLOOKUP(RC[-8],[VOLVOUPLOAD.xlsx]SHEET1!R3C[-10]:R100C[-5],6,0)"


Trying to change to include IFNA it won't accept it because it highlights the 2803F and says 'expecting end of statement'. If take out the " before the =IFNA and at the end, I don't get the VBA error message but it still does not address the N/A issue.

Range("K1").Select
ActiveCell.FormulaR1C1 = _
"=IFNA(VLOOKUP(RC[-8],[VOLVOUPLOAD.xlsx]SHEET1!R3C[-10]:R100C[-5],6,0),"2803F")"
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Hi & welcome to MrExcel.
You need to double up on the quotes inside the formula like
VBA Code:
ActiveCell.FormulaR1C1 = _
       "=IFNA(VLOOKUP(RC[-8],[VOLVOUPLOAD.xlsx]SHEET1!R3C[-10]:R100C[-5],6,0),""2803F"")"
 
Upvote 0
Solution
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,410
Messages
6,124,755
Members
449,187
Latest member
hermansoa

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