Hello Tom Urtis,
I saw your answer. Thanks!
But there is a problem my macro doesn't continue! And the part "ActiveCell.Offset(1).Select" doesn't work!
The total must appear under the row, it now appears next to the row!?!?
Sub Start()
Dim BladNaam As String
Sheets(1).Cells(3, 1).CurrentRegion.Copy
Sheets(2).Cells(6, 1).PasteSpecial xlValues
m = ActiveSheet.UsedRange.Rows.Count
For b = 3 To 15
BladNaam = Sheets(b).Name
Cells(6, b).FormulaR1C1 = "=SUMIF(" & BladNaam & "!C3,RC1," & BladNaam & "!C5)"
Cells(6, b).Copy
n = 6
Do Until Cells(n, 1) = ""
Cells(n, b).PasteSpecial
n = n + 1
Loop
ActiveCell.Offset(1).Select
CommandBars.FindControl(Id:=226).Execute
Application.SendKeys "~"
Next
Application.CutCopyMode = False
End Sub
I saw your answer. Thanks!
But there is a problem my macro doesn't continue! And the part "ActiveCell.Offset(1).Select" doesn't work!
The total must appear under the row, it now appears next to the row!?!?
Sub Start()
Dim BladNaam As String
Sheets(1).Cells(3, 1).CurrentRegion.Copy
Sheets(2).Cells(6, 1).PasteSpecial xlValues
m = ActiveSheet.UsedRange.Rows.Count
For b = 3 To 15
BladNaam = Sheets(b).Name
Cells(6, b).FormulaR1C1 = "=SUMIF(" & BladNaam & "!C3,RC1," & BladNaam & "!C5)"
Cells(6, b).Copy
n = 6
Do Until Cells(n, 1) = ""
Cells(n, b).PasteSpecial
n = n + 1
Loop
ActiveCell.Offset(1).Select
CommandBars.FindControl(Id:=226).Execute
Application.SendKeys "~"
Next
Application.CutCopyMode = False
End Sub