Accessing data-subtotal via VB

  • Thread starter Thread starter RocketMan
  • Start date Start date
R

RocketMan

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
 
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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top