+ Reply to Thread
Results 1 to 4 of 4

macro to subtotal a set of data

  1. #1
    Registered User
    Join Date
    08-15-2010
    Location
    manila,philippines
    MS-Off Ver
    Excel 2003
    Posts
    6

    macro to subtotal a set of data

    I have a spreadsheet that has columns for "Side","Stock","No.of Shares","Price" and "Ave.Price"
    It is formatted using a macro.

    I need macro code that will group all trades by stock. For any changes in stock, function is sum, add subtotal to no.of shares and extension.Then add another subtotal, For
    any changes in price, function is sum,add subtotal to no.of shares and extension.Extension is not
    included in the columns but I would like to automate to add another field "Extension" right beside "Price". To compute for the values of Extension-No.ofShares*Price.


    Can anyone help please?
    Attached Files Attached Files
    Last edited by mgmisola; 08-16-2010 at 02:53 AM. Reason: wrong title

  2. #2
    Valued Forum Contributor
    Join Date
    06-17-2009
    Location
    Chennai,India
    MS-Off Ver
    Excel 2003,excel 2007
    Posts
    678

    Re: macro to subtotal a set of data

    The file is returned "mgmisole.xls"

    column G are unique share names
    see formula in H3.copy this down and to the right.
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    08-15-2010
    Location
    manila,philippines
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: macro to subtotal a set of data

    Hi Venkat,
    I appreciate your fast response, however my problem is how will I group all data by stock if the number of rows of stock changes dynamically based on my data. I attached the final output for your reference with macro code on it.

    Many Thanks in advance!!!
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    08-15-2010
    Location
    manila,philippines
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Using SUBTOTAL macro...Pls. Help!!!

    Anyone help me on my vbcode below...please!!!!!!!1

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1