Hi there,
I took another mate's sheet and applied it to my workbook to play around but ran into one problem.
The copied the range displayed is the header row of the sub worksheet. I double checked the code, but cannot seem to find where the problem is.
So if you activate the "master" worksheet, all that gets copied over is the column header.
Anyone able to assist? I must be missing something.
Option Explicit
Private Sub Worksheet_Activate()
Dim ws As Worksheet, LR As Long
Me.UsedRange.Offset(1).Clear
For Each ws In Worksheets
LR = ws.Range("A" & Rows.Count).End(xlUp).Row
ws.Range("A2:F" & LR).Copy
Me.Range("A" & Rows.Count).End(xlUp).Offset(1).PasteSpecial xlPasteValuesAndNumberFormats
Next ws
LR = Range("A" & Rows.Count).End(xlUp).Row
With Range("A2:F" & LR)
.FormatConditions.Delete
.FormatConditions.Add Type:=xlExpression, Formula1:="=MOD(ROW(),2)=0"
.FormatConditions(1).Borders(xlTop).Weight = xlThin
.FormatConditions(1).Borders(xlBottom).Weight = xlThin
.FormatConditions(1).Interior.ColorIndex = 34
End With
Columns.AutoFit
Range("A2").Select
End Sub
Thanks
Bookmarks