Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I want to be able to execute a macro (stored in PERSONAL.XLS) that puts the following statement in the cell two rows below the bottom row of a worksheet (regardless of how many rows)
=SUBTOTAL(3,A2,Axxxx where xxxx is the last populated row. The following gets most of the way there Set dataSheet = ActiveShee totalrows = dataSheet.UsedRange.Rows.Coun startrow = totalrows + Range("A" + CStr(startrow)).FormulaR1C1 = "=SUBTOTAL(3,A2:R[-2]C[0]) The above puts the following in the correct cell, but I can't figure out how to get A2 and not 'A2 =SUBTOTAL(3,'A2':A3839) && where 3839 happens to be the last row and is what I want Can anyone help |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Are there any NON-Visual Basic solutions for inserting a picture based a derived or called filename? | Excel Worksheet Functions | |||
Loading a linked spreadsheet, Microsoft Visual Basic, error while. | Excel Discussion (Misc queries) | |||
Visual Basic Macro | Excel Discussion (Misc queries) | |||
Visual Basic macro to do something that is done trhough an Excel function | Excel Programming | |||
using visual basic controls in a excel web page saved spreadsheet | Excel Programming |