Hi Everyone,
Sheet1, Row 1: Contains headers for Columns A to O.
1- I then copy / paste Raw Data into Rows 2 to 1000+?
2- Run Macro1 to tidy-up.
3- Run Macro2 (below) the finish the job...
This woks fine, but if I Run Macro2 before doing Step 1 & 2, my Header in L1 is replaced with the Vlookup Formula...
Why?
Part of Code from Macro2:
--------------------------------------------
With Worksheets("Sheet1")
lr = .Cells(65536, 1).End(xlUp).Row
.Range("L2").Formula = "=IF(ISNA(VLOOKUP(D2,Sheet3!$A$2:$K$10000,8,FALSE)),"""",(VLOOKUP(D2,Sheet3!$A$2:$K$10000,8,FALSE)))"
.Range("L2").Copy Destination:=.Range("L3:L" & lr)
End With
Application.ScreenUpdating = False
--------------------------------------------
Am I using the " lr (xlUp)" right?
Must be simple, just can't figure it out!
Any ideas would be great.
Cheers,
Sprucy
Sheet1, Row 1: Contains headers for Columns A to O.
1- I then copy / paste Raw Data into Rows 2 to 1000+?
2- Run Macro1 to tidy-up.
3- Run Macro2 (below) the finish the job...
This woks fine, but if I Run Macro2 before doing Step 1 & 2, my Header in L1 is replaced with the Vlookup Formula...
Why?
Part of Code from Macro2:
--------------------------------------------
With Worksheets("Sheet1")
lr = .Cells(65536, 1).End(xlUp).Row
.Range("L2").Formula = "=IF(ISNA(VLOOKUP(D2,Sheet3!$A$2:$K$10000,8,FALSE)),"""",(VLOOKUP(D2,Sheet3!$A$2:$K$10000,8,FALSE)))"
.Range("L2").Copy Destination:=.Range("L3:L" & lr)
End With
Application.ScreenUpdating = False
--------------------------------------------
Am I using the " lr (xlUp)" right?
Must be simple, just can't figure it out!
Any ideas would be great.
Cheers,
Sprucy