Vlookup formula in Macro

GuyCPA

New Member
Joined
May 9, 2007
Messages
37
Hello all,

I'm trying to populate a column with a formula that looks up values from a table in another tab and returns the value from that table.

My macro seems to lock up at the following line:

ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[-5].'Aircraft Sales Table'!r[1]c[-7]:r[13]c[-6].2.FALSE)"

What am I doing wrong here?
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.

RSXchin

Well-known Member
Joined
Oct 23, 2010
Messages
758
what are you trying to make it do? I'm not sure you need to do the formula action at all.

Post your macro and what you want to make it do please.
 

pedie

Well-known Member
Joined
Apr 28, 2010
Messages
3,875
Are you not selecting the whole table as range?
or maybe try activecell.value = application.vlookup(lookupvalue,lookuprange,...
Code:
[/FONT]
[FONT=Courier New]ActiveCell.FormulaR1C1 = "=VLOOKUP(R3C8,Table1[#All],2,0)"[/FONT]
[FONT=Courier New]
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,477
Messages
5,831,909
Members
430,090
Latest member
bjonesh2o

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
Top