L
Legacy 93538
Guest
Hi
I have the macro below which should loop though shName and do a check to see if the sheet exisits within a workbook (PPOld) and if it does then copy the data into the a sheet in another workbook (PPNew)
However it only works for one sheet and i need to check for two sheets "DE" and "PL".
Does anyone know how to be able to loop through multiple sheets?
Thank you
Jessicaseymour
I have the macro below which should loop though shName and do a check to see if the sheet exisits within a workbook (PPOld) and if it does then copy the data into the a sheet in another workbook (PPNew)
Code:
shName = "DE"
shFound = False
For Each sh In Worksheets
If LCase(sh.Name) = LCase(shName) Then
shFound = True
PPOld.Sheets(shName).cells.Copy Destination:=PPNew.Sheets(shName).Range("A1")
End If
Next
However it only works for one sheet and i need to check for two sheets "DE" and "PL".
Does anyone know how to be able to loop through multiple sheets?
Thank you
Jessicaseymour