View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 10,593
Default 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