![]() |
Access Subtotals from Macro
Hello all,
Just wondering if it is possible to access subtotals from a marco? If so I am just looking for the general syntax. I do quite a few extracts where the data needs to be subtotaled and then !some! of the subtotals need to be used in another sheet (or book).This would be the formula entered in the cell if done manually "='Buyouts 09.05'!F3911" but that makes reference to a specific cell which will not be the same the next time.Sample data would be something like: A |B |C A1 1 100 A1 1 100 A1 1 TOTAL 200 A1 2 5 A1 2 6 A1 2 TOTAL 11 A1 TOTAL 211 Does anyone know of a way to accomplish this? Is it even possible? Terry |
Access Subtotals from Macro
Can you search through the sheet and find the word total? - sure.
Turn on the macro recorder, then do Edit=find and search for Total. (make appropriate other settings). Then turn off the macro recorder. Look at the help example for the FindNext method of the range of sample code of how you would use the find method to find multiple instances. You could then use this information to build your formulas. Or you can select the column with the subtotal formulas and do Edit=Goto=specialCells and select Formulas and Numbers does this select all the cells you need? If so, do it with the macro recorder turned on. -- Regards, Tom Ogilvy "Terry K" wrote in message oups.com... Hello all, Just wondering if it is possible to access subtotals from a marco? If so I am just looking for the general syntax. I do quite a few extracts where the data needs to be subtotaled and then !some! of the subtotals need to be used in another sheet (or book).This would be the formula entered in the cell if done manually "='Buyouts 09.05'!F3911" but that makes reference to a specific cell which will not be the same the next time.Sample data would be something like: A |B |C A1 1 100 A1 1 100 A1 1 TOTAL 200 A1 2 5 A1 2 6 A1 2 TOTAL 11 A1 TOTAL 211 Does anyone know of a way to accomplish this? Is it even possible? Terry |
All times are GMT +1. The time now is 11:21 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com