Sum when rows of numbers varies(2)

MJA

Board Regular
Joined
Feb 18, 2002
Messages
79
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
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
Sorry, looks like your follow up post post got repeated somehow but is now all on this one thread.

If my most recent suggestion does not work for you, please repost, with a description of what you are trying to do.

Tom U.
 
Upvote 0

Forum statistics

Threads
1,223,284
Messages
6,171,181
Members
452,388
Latest member
Lorenzo_Barry

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top