Using a lookup table to populate a column in Source Table.

Somewhere

New Member
Joined
Mar 1, 2013
Messages
19
Hi

Here is what I am trying to achieve:

I have a Table1 on Sheet1 in my workbook.

I am trying to get a macro setup that looks up against Table2 (located on Sheet2 in my workbook) using the STATE and TYPE columns

When the criteria matches the PRIORITY Value is copied from Table2 into the PRIORITY column in Table1

I have attached a screen shot which hopefully helps explain this..

https://www.dropbox.com/s/r3rlq54y5nj66i7/IMG_6376.PNG?dl=0
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
It's difficult to work with a picture. Can you upload a copy of your file?
 
Upvote 0
Any reason for a macro? This can easily be done by a formula.
 
Upvote 0
Its a really large table so was hopeful to achieve this in VBA rather than copying down a formula in the column.
 
Upvote 0
One of the beauties about tables, is you don't need to fill the formula down. Put this in the first cell
=IFERROR(INDEX(Table2[priority],MATCH([@State]&"|"&[@Type],INDEX(Table2[State]&"|"&Table2[type],0),0)),"")
and it should fill down automatically.
 
Upvote 0
Great thanks, I need to manipulate the data more once the look formula populates the values..so by using the formula and copy/paste values in a macro seems to have done it :)
 
Upvote 0
Glad you sorted it & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,214,653
Messages
6,120,751
Members
448,989
Latest member
mariah3

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