I'm pretty new to VBA and have a question regarding some code. The code below is just section of code from a Excel macro. I've read many places about removing the .Select and .Activate commands as these slow down the process. Could someone let me know how I would do that in this case? Many thanks
Sheets("Sheet1").Activate
Set output = Range("U139")
Set Name = Range("U6")
Sheets("PPR Data").Select
Set myrange = Range("C:E")
output.Value = Application.WorksheetFunction.VLookup(Name, myrange, 3, False)
Sheets("Sheet1").Select
Set output = Range("W139")
Set Name = Range("W6")
Sheets("PPR Data").Select
Set myrange = Range("C:E")
output.Value = Application.WorksheetFunction.VLookup(Name, myrange, 3, False)
Sheets("Sheet1").Select
Set output = Range("X139")
Set Name = Range("X6")
Sheets("PPR Data").Select
Set myrange = Range("C:E")
output.Value = Application.WorksheetFunction.VLookup(Name, myrange, 3, False)
Sheets("Sheet1").Select
Set output = Range("V139")
Sheets("PPR LP").Select
output.Value = Application.WorksheetFunction.Max(Range("C:K"))