However, it's treating the A7&B7 as a literal, by inserting apostrophes: 'A7'&'B7'
That's preventing the lookup from working. How can I tell it that A7 and B7 and cells in the spreadsheet, and not literals?
After executing this line of code, switch back to Excel, click in the formula bar (the whole formula should be selected), hit Ctrl-C to copy it, hit Esc to get out of edit mode, and paste the result here. That is, what is the formula that the cell ends up having?
The reason it faild is because when you use FormulaR1C1, then it expects a formula written in R1C1 style references.
But you were giving it a formula written in A1 style.
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.