I am trying to create a macro that searches a table on the "names" tab in the table called Names. The Names table is a list of company names that should be consolidated (Apple, LLC, Apple, Inc, iPhone, LLC, etc.)
The names are in column A, I want to hardcode the name override in column B, as it's already a slow file. The list goes down to row 1015 at the moment. A recording looks like the below.
Thanks for any help.
Sub Macro2()
Range("B16").Select
ActiveCell.FormulaR1C1 = "=IFERROR(VLOOKUP(RC[-1],Names,2,FALSE),"""")"
Selection.Copy
Range("A16").Select
Selection.End(xlDown).Select
Range("B1015").Select
Range(Selection, Selection.End(xlUp)).Select
ActiveSheet.Paste
Selection.End(xlUp).Select
Range("B16").Select
Application.CutCopyMode = False
Calculate
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Calculate
End Sub
The names are in column A, I want to hardcode the name override in column B, as it's already a slow file. The list goes down to row 1015 at the moment. A recording looks like the below.
Thanks for any help.
Sub Macro2()
Range("B16").Select
ActiveCell.FormulaR1C1 = "=IFERROR(VLOOKUP(RC[-1],Names,2,FALSE),"""")"
Selection.Copy
Range("A16").Select
Selection.End(xlDown).Select
Range("B1015").Select
Range(Selection, Selection.End(xlUp)).Select
ActiveSheet.Paste
Selection.End(xlUp).Select
Range("B16").Select
Application.CutCopyMode = False
Calculate
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Calculate
End Sub