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

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
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,214,805
Messages
6,121,664
Members
449,045
Latest member
Marcus05

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