+ Reply to Thread
Results 1 to 3 of 3

marco help

  1. #1
    Registered User
    Join Date
    08-17-2006
    Posts
    1

    marco help

    Keep getting an error message with i try to write a marco to caculate the subtotal of a items. say i am trying to total the number of sales a rep has for a product. please see example below and help.
    ID Product Item Sales
    p1 beh 1745 20
    p1 hbe 1742 5
    p1 bed 125 10
    p1 hbe 172 15
    p2 hbe 1742 52

    and so on with several defferent ID and products.......any help you could give would be helpful.

  2. #2
    Tom Ogilvy
    Guest

    RE: marco help

    Did you turn on the macro recorder and do it manually?

    Also, you would need to sort by ID and then Product before you do it to get
    the correct subtotals.
    --
    Regards,
    Tom Ogilvy


    "mr1104839" wrote:

    >
    > Keep getting an error message with i try to write a marco to caculate
    > the subtotal of a items. say i am trying to total the number of sales a
    > rep has for a product. please see example below and help.
    > ID Product Item Sales
    > p1 beh 1745 20
    > p1 hbe 1742 5
    > p1 bed 125 10
    > p1 hbe 172 15
    > p2 hbe 1742 52
    >
    > and so on with several defferent ID and products.......any help you
    > could give would be helpful.
    >
    >
    > --
    > mr1104839
    > ------------------------------------------------------------------------
    > mr1104839's Profile: http://www.excelforum.com/member.php...o&userid=37661
    > View this thread: http://www.excelforum.com/showthread...hreadid=572716
    >
    >


  3. #3
    Jim Thomlinson
    Guest

    RE: marco help

    Are you trying to insert Subtotals (Data -> Subtotal) or are you trying to
    write a macro to look through your data and determine some subtotals? To
    insert subtotals turn on the macro recorder and just have at it. To determine
    the subtotals via code I mighrt suggest using a sumproduct formula instead...
    Here is a link...

    http://www.xldynamic.com/source/xld.SUMPRODUCT.html
    --
    HTH...

    Jim Thomlinson


    "mr1104839" wrote:

    >
    > Keep getting an error message with i try to write a marco to caculate
    > the subtotal of a items. say i am trying to total the number of sales a
    > rep has for a product. please see example below and help.
    > ID Product Item Sales
    > p1 beh 1745 20
    > p1 hbe 1742 5
    > p1 bed 125 10
    > p1 hbe 172 15
    > p2 hbe 1742 52
    >
    > and so on with several defferent ID and products.......any help you
    > could give would be helpful.
    >
    >
    > --
    > mr1104839
    > ------------------------------------------------------------------------
    > mr1104839's Profile: http://www.excelforum.com/member.php...o&userid=37661
    > View this thread: http://www.excelforum.com/showthread...hreadid=572716
    >
    >


+ 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