+ Reply to Thread
Results 1 to 2 of 2

Subtotal method of Range not working correctly

  1. #1
    Registered User
    Join Date
    10-21-2008
    Location
    London, UK
    Posts
    1

    Subtotal method of Range not working correctly

    Hi all, newbie here. Have a problem which is driving me nuts, can anyone help? Thanks.

    Here is the raw test data I am working with. There are 3 columns (I don't have field names).:

    2432 afadfds BEGIN
    32432 dfafdsf BEGIN
    232323 fdsfdsfds WIN
    23 dfsdf END
    32 fdsfdsfds END

    I run this code (to total the 1st column according to the 3rd column groups) :

    Please Login or Register  to view this content.

    And the result looks like this:

    2432 afadfds BEGIN
    32432 dfafdsf BEGIN
    32432 BEGIN Total
    232323 fdsfdsfds WIN
    232323 WIN Total
    23 dfsdf END
    32 fdsfdsfds END
    55 END Total
    264810 Grand Total


    The problem is that the BEGIN total hasn't added the first line value (2432) into the BEGIN total.
    Last edited by NewToExcelVBA; 10-21-2008 at 10:48 AM.

  2. #2
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606
    Subtotal requires a header row so just stick some headings at the top.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. select method of range class failed error
    By johndough185 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-06-2007, 08:36 AM
  2. Macro not working correctly
    By Colin Vicary in forum Excel General
    Replies: 3
    Last Post: 02-21-2007, 04:48 PM
  3. Print Range Macro "ALMOST" working.
    By Tom44556 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-19-2007, 11:53 AM
  4. PasteSpecial method of Range class failed
    By reborges in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-01-2007, 02:27 PM
  5. VBA not working correctly
    By HuskerBronco in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-28-2006, 03:15 PM

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