Hi All

I'm trying I create something in VBA but I don't know whether I could simplify this code any further. Just to explain what this code does is update a volume tracking table on each sheet in the workbook. So for Sheet Q4 it'll go through Sheets Q1-Q3 and copy the data across to Q4.

Is there any way to simplify this with a loop - I tried but keep getting stuck because the amount I copy for Q4 is different to what I'd copy for Q1 for examples

Anyway the code is here


Dim wks As Worksheet 

With Workbooks(cFileName) 
On Error Resume Next 

For Each wks In .Worksheets 
Select Case wks.Name 
    Case "Q2" 
        .Sheets("Q2").Cells(9, 11) = .Sheets("Q1").Cells(9, 11) 
        .Sheets("Q2").Cells(11, 11) = .Sheets("Q1").Cells(11, 11) 
        .Sheets("Q2").Cells(13, 11) = .Sheets("Q1").Cells(13, 11) 
        .Sheets("Q2").Cells(43, 6) = .Sheets("Q1").Cells(43, 6) 
        .Sheets("Q2").Cells(43, 8) = .Sheets("Q1").Cells(43, 8) 
    Case "Q3" 
        .Sheets("Q3").Cells(9, 11) = .Sheets("Q1").Cells(9, 11) 
        .Sheets("Q3").Cells(11, 11) = .Sheets("Q1").Cells(11, 11) 
        .Sheets("Q3").Cells(13, 11) = .Sheets("Q1").Cells(13, 11) 
        .Sheets("Q3").Cells(9, 12) = .Sheets("Q2").Cells(9, 12) 
        .Sheets("Q3").Cells(11, 12) = .Sheets("Q2").Cells(11, 12) 
        .Sheets("Q3").Cells(13, 12) = .Sheets("Q2").Cells(13, 12) 
        .Sheets("Q2").Cells(43, 6) = .Sheets("Q1").Cells(43, 6) 
        .Sheets("Q2").Cells(43, 8) = .Sheets("Q1").Cells(43, 8) 
        .Sheets("Q2").Cells(44, 6) = .Sheets("Q1").Cells(44, 6) 
        .Sheets("Q2").Cells(44, 8) = .Sheets("Q1").Cells(44, 8) 
    Case "Q4" 
        .Sheets("Q4").Cells(9, 11) = .Sheets("Q1").Cells(9, 11) 
        .Sheets("Q4").Cells(11, 11) = .Sheets("Q1").Cells(11, 11) 
        .Sheets("Q4").Cells(13, 11) = .Sheets("Q1").Cells(13, 11) 
        .Sheets("Q4").Cells(9, 12) = .Sheets("Q2").Cells(9, 12) 
        .Sheets("Q4").Cells(11, 12) = .Sheets("Q2").Cells(11, 12) 
        .Sheets("Q4").Cells(13, 12) = .Sheets("Q2").Cells(13, 12) 
        .Sheets("Q4").Cells(9, 13) = .Sheets("Q3").Cells(9, 13) 
        .Sheets("Q4").Cells(11, 13) = .Sheets("Q3").Cells(11, 13) 
        .Sheets("Q4").Cells(13, 13) = .Sheets("Q3").Cells(13, 13) 
        .Sheets("Q2").Cells(43, 6) = .Sheets("Q1").Cells(43, 6) 
        .Sheets("Q2").Cells(43, 8) = .Sheets("Q1").Cells(43, 8) 
        .Sheets("Q2").Cells(44, 6) = .Sheets("Q1").Cells(44, 6) 
        .Sheets("Q2").Cells(44, 8) = .Sheets("Q1").Cells(44, 8) 
        .Sheets("Q2").Cells(45, 6) = .Sheets("Q1").Cells(45, 6) 
        .Sheets("Q2").Cells(45, 8) = .Sheets("Q1").Cells(45, 8) 
End Select 
Next wks 

End With