mdmackillop.
Yes, that's it. Thanks a million.
One thing baffles me though. I tried your code on a workbook with 35 sheets and it will put the first amount from cell D10 also in cell D45 but
not the relevant string in cell A45. What I am trying to say is that I get
one extra entry in column D at the end that should not be there.
The code is now as follows:
Sub SwapColumns()
Dim destSH As Worksheet, sh As Worksheet
Dim Rw As Long, shNum As Long
Application.ScreenUpdating = False
Sheets("Daily").Copy After:=Sheets(Sheets.Count)
With ActiveSheet
.Name = "Summary"
.Shapes("SaveDailyButton").Delete
.Range("A10:D" & Cells(Rows.Count, "D").End(xlUp).Row).ClearContents
End With
Rw = 10
Set destSH = Worksheets("Summary") 'ActiveSheet
For shNum = 4 To Worksheets.Count
Set sh = Worksheets(shNum)
With destSH
.Cells(Rw, 1).Value = sh.Range("C10").Value
.Cells(Rw, 4).Value = sh.Range("D10").Value
End With
Rw = Rw + 1
Next shNum
With Sheets("Summary").Range("A10:D" & Cells(Rows.Count, "D").End(xlUp).Row).Font
.Name = "Verdana"
.Size = 9
.Bold = False
.Italic = False
End With
With Sheets("Summary").Range("D10:D" & Cells(Rows.Count, "D").End(xlUp).Row)
.NumberFormat = "_($* #,##0.00_);_($* (#,##0.00);_($* ""-""??_);_(@_)"
End With
Application.ScreenUpdating = True
End Sub
I can't find why it would be doing that.