I have a macro to copy data from row B3 to the last row containing data in C3 on all sheets except specified sheets and all formulas to remain intact-see specified sheets not to be affected in code for eg Main Menu, YTD-Dashboard etc
Row B3 onwards in being copied on some of the specified sheets and paste valued into Col C
It would be appreciated if someone could kindly amend my formula
Row B3 onwards in being copied on some of the specified sheets and paste valued into Col C
It would be appreciated if someone could kindly amend my formula
Code:
Sub Copy_Data()
Dim lr As Long, ws As Worksheet
For Each ws In Worksheets
If ws.Name <> "Main Menu" And ws.Name <> "YTD" And ws.Name <> "YTD-Dashboard" And ws.Name <> "Expenses" And _
ws.Name <> "YTD-Including Units" And ws.Name <> "Months" And ws.Name <> "Monthly Data detail" _
And ws.Name <> "Scroll Bar By Month" And ws.Name <> "YTD Filtered Data" Then
lr = ws.Cells(Rows.Count, "B").End(xlUp).Row
ws.Range("B3:B" & lr).Copy
ws.Range("C3").PasteSpecial xlPasteValues
End If
Next ws
Application.CutCopyMode = False
End Sub