Accessing data-subtotal via VB
I have a spreadsheet that already has subtotals generated via menu
(Data - Subtotal). Is there a way to get those subtotals via VB without resorting to using the row number? THANKS John |
Accessing data-subtotal via VB
Maybe something like this
LastRow = Cells(Rows.Count, "A").End(xlUp).Row For i = 1 To LastRow If Cells(i, "A").Value Like "*Total*" Then 'do something with the value in the adjacent cell Cells(i, "B").Value End If Next i -- --- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "RocketMan" wrote in message ups.com... I have a spreadsheet that already has subtotals generated via menu (Data - Subtotal). Is there a way to get those subtotals via VB without resorting to using the row number? THANKS John |
All times are GMT +1. The time now is 11:24 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com