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.
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.