![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Feb 2002
Location: Hengelo
Posts: 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 |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: San Francisco, California USA
Posts: 10,382
|
Try replacing
ActiveCell.Offset(1).Select with ActiveCell.Offset(1, -1).Select T.U. |
|
|
|
|
|
#3 |
|
MrExcel MVP
Join Date: Feb 2002
Location: San Francisco, California USA
Posts: 10,382
|
You posted an identical question which I attempted to answer at
http://www.mrexcel.com/board/viewtop...=154&forum=2&1 T.U. |
|
|
|
|
|
#4 |
|
MrExcel MVP
Join Date: Feb 2002
Location: San Francisco, California USA
Posts: 10,382
|
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. |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|