PC Review


Reply
Thread Tools Rate Thread

Accessing data-subtotal via VB

 
 
RocketMan
Guest
Posts: n/a
 
      12th Nov 2007
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

 
Reply With Quote
 
 
 
 
Bob Phillips
Guest
Posts: n/a
 
      12th Nov 2007
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>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
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Best way to subtotal this data? Jonathan Microsoft Excel Worksheet Functions 8 27th Mar 2008 06:39 PM
Copy and paste data from Auto Filter / Subtotal (or apply a formula to filtered data) Harry Flashman Microsoft Excel Discussion 7 9th Oct 2007 04:39 PM
Data/Subtotal =?Utf-8?B?c3dlZXRtYW5z?= Microsoft Excel Misc 1 29th Nov 2006 12:31 AM
Subtotal when using XML data =?Utf-8?B?QmFzYW50aA==?= Microsoft Excel Misc 0 8th May 2006 07:44 PM
Using data, subtotal =?Utf-8?B?S2F0aGll?= Microsoft Excel Worksheet Functions 1 3rd Mar 2006 04:49 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:17 PM.