+ Reply to Thread
Results 1 to 5 of 5

Sorting between bold rows?

  1. #1
    Registered User
    Join Date
    09-26-2005
    Posts
    39

    Sorting between bold rows?

    Greetings:

    I have a report that comes out of my financial software and it has a column with a sales rep's name and then all of the accounts that rep has. Then there is a row that is bold and is the totals for that rep. Then the very next row is not bold and it's the next sales rep's accounts. Then a total... That column would look something like this:

    Joe Smith
    Account 1
    Account 2
    Account 3
    Joe Smith Total
    Tim Jenkins
    Account A
    Account B
    Account C
    Tim Jenkins Total

    It goes on and on. Of course, column B just has sales data in it.

    What I want to do is write a macro that selects the rows for Joe Smith (that aren't header rows so Account 1-3) and then sorts based on column B sales.

    Then it would skip down and select Account A-C rows and sort again. That way I have all my reps with their highest account at the top of their section. I do this manually now and it takes hours to do my reporting.

    Any tips would be GREATLY appreciated!

  2. #2
    Forum Contributor
    Join Date
    11-17-2006
    Posts
    152
    create a pivot table

  3. #3
    Registered User
    Join Date
    09-26-2005
    Posts
    39
    That's not an option since this file goes up the ladder to my bosses and has to be in this format. I really just need to sort between those bold fields.

  4. #4
    Forum Contributor
    Join Date
    10-08-2006
    Location
    Walnut, CA
    MS-Off Ver
    2003,2010, Office 365
    Posts
    114
    Hi,
    You can try the following codes.

    Please Login or Register  to view this content.
    Good Luck!
    Tony

  5. #5
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Hi Tony,

    The code stops if you add more data. Think it's because of the double bold cells Joe Smith Total and Tim Jenkins

    I've add a line which seems to handle that.

    PS Nice work

    Please Login or Register  to view this content.
    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

+ 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