Vlookups with Activecell.Row ref

Smeggy

Board Regular
Joined
Mar 7, 2013
Messages
151
Hi All,
I'm pretty certain that this should be straight forward, having suffered a rather large brain fart i cant remember
how to use activecell.row in a vlookup.

with this it would be something along the lines of =Vlookup(AM & row,sheet1,B:C,2,false)
But i cant get this working
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Try

=Vlookup(" & Range("AM" & ActiveCell.Row) & ",sheet1!B:C,2,false)
 
Upvote 0
Hi VoG,
Thanks for the reply, i tried yours and it pasted the formula in without the lookup range (" & RAnge("AM" & Activecell.row), for some reason
It just missed it off.
I've added a few a bit to this one as i realised after i posted that the cells im searching in need converting to numbers, so ive added a ""£
before the cell, any ideas why it would drop off the cell ref?
I've also amended the shheet name just incase that was the issue.

ActiveCell.Formula = "=VLOOKUP(" & Range("""&A" & ActiveCell.Row) & " ,'[upgrade_report.xls]9. MEAS Site Detail'!,$B:$C,2,FALSE)"

Thanks
 
Upvote 0
Oops!

Rich (BB code):
"=Vlookup(" & Range("AM" & ActiveCell.Row).Address & ",sheet1!B:C,2,false)"
 
Upvote 0
Hi,
I now get an error 1004, with the following, any ideas?

ActiveCell.Formula = "=VLOOKUP(" & Range("""&A" & ActiveCell.Row).Address & " ,'[upgrade_report.xls]9. MEAS Site Detail'!,$B:$C,2,FALSE)"
 
Upvote 0
Try

Code:
"=VLOOKUP(" & Range("A" & ActiveCell.Row).Address & " ,'[upgrade_report.xls]9. MEAS Site Detail'!,$B:$C,2,FALSE)"
 
Upvote 0
Hi VoG,
It was an errant "," just before the sheet name, the formula will now enter the sheet however because the look up reference sheet is a
column of convert to numbers the result is N/A. When i add ""& to the beginning of the formula i.e. (" & RAnge("""&A".... it doesn't recognise it,
do you have any ideas about this?
 
Upvote 0
Not really, other than converting your numbers stored as text into numbers.
 
Upvote 0

Forum statistics

Threads
1,213,494
Messages
6,113,981
Members
448,538
Latest member
alex78

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