Hi All, (bit of a lurker me).
So ive been building a new spreadsheet that looks into column G, sees if there is a Yes or No and populates a new sheet(s). It all works..fantastic.
However The formatting is all over the place. Id like for it to maintain the formatting (cell size) primarily.
My code is
Any ideas?Sub Ground_Floor() Dim lrow As Long Dim i As Long Dim sname As String Application.ScreenUpdating = False With Worksheets("Ground Level") lrow = .Range("G" & .Rows.Count).End(xlUp).Row For i = 2 To lrow sname = .Range("G" & i).Value If Not Evaluate("ISREF('" & sname & "'!A1)") Then Worksheets.Add(after:=Worksheets(Worksheets.Count)).Name = sname .Rows("1:1").Copy Worksheets(sname).Range("A1") End If .Rows(i & ":" & i).Copy Worksheets(sname).Range("A" & .Rows.Count).End(xlUp).Offset(1, 0) Next i End With Application.ScreenUpdating = True End Sub
My code/macro works perfectly, just not copying over the cell size meaning the table that is produced crops alot of information, requiring the user to resize it EVERY TIME
Bookmarks