lookup vba

Prashod

Board Regular
Joined
Jan 19, 2009
Messages
55
Gday all,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
<o:p></o:p>
I am after a vba code which could do the lookup for me from a defined range.<o:p></o:p>
For example<o:p></o:p>
I have Sheet1 and sheet2.<o:p></o:p>
Sheet2 has<o:p></o:p>
A B <o:p></o:p>
aa 1<o:p></o:p>
bb 2<o:p></o:p>
cc 3<o:p></o:p>
dd 4<o:p></o:p>
<o:p></o:p>
and on Sheet1 I have<o:p></o:p>
<o:p></o:p>
A B<o:p></o:p>
cc<o:p></o:p>
cc<o:p></o:p>
aa<o:p></o:p>
dd<o:p></o:p>
<o:p></o:p>
I want it to auto populate columnA on sheet1 with all the lookup values from sheet2. It has to do this for all the rows under columnB in sheet1.<o:p></o:p>
<o:p></o:p>
Any help would be appreciated<o:p></o:p>
Thanks in advance<o:p></o:p>
<o:p></o:p>
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Isn't this just something that a VLOOKUP formula would do?
 
Upvote 0
Hi Glenn,

Yes vlookup or match should do it, but i am trying to running a series of events to create this report. I have completed the others but I am just stuck with this one.
Any help in creating a VBA would be greatly appreciated.
 
Upvote 0
Use the macro recorder to record putting a VLOOKUP formula into cells to do this.
 
Upvote 0

Forum statistics

Threads
1,224,606
Messages
6,179,862
Members
452,948
Latest member
UsmanAli786

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