Viktor
11-04-2013, 04:57 AM
Hey guys,
I have the below code which copies the row B from each worksheet into my Master Data sheet. How can I adjust it so that it pastes only the values and number formatting?
Sub CopyRows2ToDataSheet()
Dim ws As Worksheet, _
LR As Long
Application.ScreenUpdating = False
For Each ws In ActiveWorkbook.Worksheets
If ws.Name <> "Master Data sheet" Then
LR = Sheets("Master Data sheet").Range("A" & Rows.Count).End(xlUp).Row + 1
ws.Range("2:2").Copy Destination:=Sheets("Master Data sheet").Range("A" & LR1)
End If
Next ws
Application.ScreenUpdating = True
End Sub
Thanks a lot, Viktor
I have the below code which copies the row B from each worksheet into my Master Data sheet. How can I adjust it so that it pastes only the values and number formatting?
Sub CopyRows2ToDataSheet()
Dim ws As Worksheet, _
LR As Long
Application.ScreenUpdating = False
For Each ws In ActiveWorkbook.Worksheets
If ws.Name <> "Master Data sheet" Then
LR = Sheets("Master Data sheet").Range("A" & Rows.Count).End(xlUp).Row + 1
ws.Range("2:2").Copy Destination:=Sheets("Master Data sheet").Range("A" & LR1)
End If
Next ws
Application.ScreenUpdating = True
End Sub
Thanks a lot, Viktor