Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Correct Macro for Totals
Hi All
I am trying to use this macro shown below to produce a total line at the bottom of each sheet I am using. Sheets(Array("Sheet1", "Sheet2", "Sheet3")).Select Sheets("Sheet1").Activate ActiveCell.SpecialCells(xlLastCell).Select Range("E10").Select ActiveCell.FormulaR1C1 = "=SUM(R[-9]C:R[-1]C)" Range("E10").Select Selection.AutoFill Destination:=Range("A10:E10"), Type:=xlFillDefault Range("A10:E10").Select End Sub The problem is the the number of rows varies from each sheet, so the totals will be in the wrong place for most of the sheets. Is there any way that the total per column can be offset so they are say 2 rows below the bottom number on each sheet? Many thanks franklin -- Message posted via http://www.officekb.com |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Correct syntax for IF, Then in a macro | Excel Worksheet Functions | |||
How do you correct inaccurate sumif totals? | Excel Worksheet Functions | |||
Correct Macro so that if the person is not in the source document | Excel Worksheet Functions | |||
my pivot tables are correct but my totals and GT don't show | Excel Discussion (Misc queries) | |||
Please correct my macro | Excel Discussion (Misc queries) |