+ Reply to Thread
Results 1 to 12 of 12

Hard sorting process. Dates and supplier code mixed in same column

  1. #1
    Registered User
    Join Date
    09-21-2011
    Location
    Hampshire
    MS-Off Ver
    Excel 2003
    Posts
    74

    Hard sorting process. Dates and supplier code mixed in same column

    Hi all,

    any point in the right direction to answer this would be ideal, I have attached a file showing my dilemma just to help explain a little bit. Otherwise here goes:


    I have an auto generated report that is exported into .csv, my dilemma is that it sorts both the account code and the date in the same column, like this:

    9884 A B Gerrish Ltd ? 577.27 0 577.27 0
    30/09/2012 31/10/2012 18655 18655 277.01 0 277.01 MAL/553260
    30/09/2012 31/10/2012 18842 18842 264.26 0 264.26 MAL/553259
    30/11/2012 31/12/2012 19554 19554 36 0 36 MEL/549200

    so "9884" and "30/09/2012" are in the same column.

    Some how i need to turn this information to say the below three invoices are for account 9884, into more of a usuable data like:

    9884 A B Gerrish Ltd 30/09/2012 etc etc.

    Obviously through out the document this repeats for each account, upto some 1000 accounts.
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    09-21-2011
    Location
    Hampshire
    MS-Off Ver
    Excel 2003
    Posts
    74

    Re: Hard sorting process. Dates and supplier code mixed in same column

    If you need more information please feel free to let me know. Even if it is telling me that it is not possible.

  3. #3
    Registered User
    Join Date
    09-21-2011
    Location
    Hampshire
    MS-Off Ver
    Excel 2003
    Posts
    74

    Re: Hard sorting process. Dates and supplier code mixed in same column

    is this possible?

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,986

    Re: Hard sorting process. Dates and supplier code mixed in same column

    I'm still asleep... I lost my first reply.

    When I open the sheet, the supplier code (9984) and name (AB Gerrish) ARE in separate columns. Am I being thick & missing the point? It'd be easier to follow if you clearly showed a "before" and "desired after" example so that the viewers can see exactly what you're after...

  5. #5
    Registered User
    Join Date
    09-21-2011
    Location
    Hampshire
    MS-Off Ver
    Excel 2003
    Posts
    74

    Re: Hard sorting process. Dates and supplier code mixed in same column

    thanks Glenn, fair shout on the before and after here goes, file attached but also:

    BEFORE:
    9884 A B Gerrish Ltd œ 577.27 0 577.27 0
    30/09/2012 31/10/2012 18655 18655 277.01 0 277.01 MAL/553260
    30/09/2012 31/10/2012 18842 18842 264.26 0 264.26 MAL/553259
    30/11/2012 31/12/2012 19554 19554 36 0 36 MEL/549200
    2034 A C Toon œ 414.56 0 414.56 0
    19/10/2012 30/11/2012 142977 142977 414.56 0 414.56 LTH/574243
    4323 A E Spink Ltd œ 90.46 0 90.46 -204

    6771 A Grade Timber œ 460.2 0 460.2 -1192.12
    31/10/2012 30/11/2012 93075 93075 338.09 0 338.09 AND/366828
    27/11/2012 31/12/2012 93580 93580 41.47 0 41.47 NBY/501470

    AFTER:
    9884 A B Gerrish Ltd œ 577.27 0 577.27 0 30/09/2012 31/10/2012 18655 18655 277.01 0 277.01 MAL/553260
    9885 A B Gerrish Ltd œ 577.27 0 577.27 0 30/09/2012 31/10/2012 18842 18842 264.26 0 264.26 MAL/553259
    9886 A B Gerrish Ltd œ 577.27 0 577.27 0 30/11/2012 31/12/2012 19554 19554 36 0 36 MEL/549200

    2034 A C Toon œ 414.56 0 414.56 0 19/10/2012 30/11/2012 142977 142977 414.56 0 414.56 LTH/574243

    4323 A E Spink Ltd œ 90.46 0 90.46 -204 07/11/2012 31/12/2012 677 21 677 21 90.46 0 90.46 DON/491568

    6771 A Grade Timber œ 460.2 0 460.2 -1192.12 31/10/2012 30/11/2012 93075 93075 338.09 0 338.09 AND/366828
    6772 A Grade Timber œ 460.2 0 460.2 -1192.12 27/11/2012 31/12/2012 93580 93580 41.47 0 41.47 NBY/501470
    6773 A Grade Timber œ 460.2 0 460.2 -1192.12 30/11/2012 31/12/2012 93657 93657 80.64 0 80.64 MEL/493043

  6. #6
    Registered User
    Join Date
    09-21-2011
    Location
    Hampshire
    MS-Off Ver
    Excel 2003
    Posts
    74

    Re: Hard sorting process. Dates and supplier code mixed in same column

    sorry attachement
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    09-21-2011
    Location
    Hampshire
    MS-Off Ver
    Excel 2003
    Posts
    74

    Re: Hard sorting process. Dates and supplier code mixed in same column

    Any luck Glenn? any help would be appreciated.

  8. #8
    Registered User
    Join Date
    09-21-2011
    Location
    Hampshire
    MS-Off Ver
    Excel 2003
    Posts
    74

    Re: Hard sorting process. Dates and supplier code mixed in same column

    Can anyone help with this.

  9. #9
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Hard sorting process. Dates and supplier code mixed in same column

    How do we check where the first row should end?
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  10. #10
    Registered User
    Join Date
    09-21-2011
    Location
    Hampshire
    MS-Off Ver
    Excel 2003
    Posts
    74

    Re: Hard sorting process. Dates and supplier code mixed in same column

    Arlu,

    I am not sure, basically every row with out a date at the start is the start of a new account.

  11. #11
    Forum Expert
    Join Date
    08-27-2008
    Location
    England
    MS-Off Ver
    2010
    Posts
    2,561

    Re: Hard sorting process. Dates and supplier code mixed in same column

    This can be done with complicated formulae or simpler macros, which include a management overhead. Do you have a preference before we start either avenue?
    CC


    If you feel really indebted please consider a donation to charity. My preferred charity is ActionAid but there are plenty of worthy alternatives.

  12. #12
    Forum Expert
    Join Date
    08-27-2008
    Location
    England
    MS-Off Ver
    2010
    Posts
    2,561

    Re: Hard sorting process. Dates and supplier code mixed in same column

    This macro:
    Moves lines starting with dates onto the end of multiple copies of the preceding line without dates
    Were possible, it increments the order number of the copied line without a date
    It ignores blank lines (8)

    Not sure what the expected outcome is for the last line of the extract
    I don't like that I am setting my newline boolean to false multiple times but not interested in fixing it...

    Please Login or Register  to view this content.

+ 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