VBA Question for V-Look Up from Another Sheet

jgome21

New Member
Joined
Nov 26, 2017
Messages
13
Hi Guys,

I am trying to bring the following V Look Up formula into Column A on a sheet called "AIC Data".

=VLOOKUP(V2,'Key Card'!D:E,2,0)

The V Look Up is coming from a data source on another Sheet "Key Card".

Can anyone assist with the proper VBA?

So far I have the following below but the formula isn't coming down the entire Column A of the data source.



Sub FormatData()


'
Application.ScreenUpdating = False

Sheets("AIC Data").Select
Range("A2").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[21],'Key Card'!C4:C5,2,false)"
Range("V2").Select
Selection.Copy
Range("V2").Select
Selection.End(xlDown).Select
ActiveCell.Offset(0, -21).Select
Range("V2").Select
Selection.CurrentRegion.Select
Range("V2").Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select

With ActiveWorkbook.Worksheets("AIC Data").AutoFilter.Sort
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With

Thank you.
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.

Forum statistics

Threads
1,213,531
Messages
6,114,167
Members
448,554
Latest member
Gleisner2

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