• dwain.c (9/29/2013)


    Running the code you quoted Jeff, I get these results.

    sourcedata sourcedata2

    12 Jan 2013 Test.docx 20130112 Test.docx

    01 February 2001 File.pptx 20010201 File.pptx

    Meeting 04 Feb 2012.xlsMeeting 20120204.xls

    09 September 2011.txt 20110909.txt

    30 Jan 13.doc 20130130.doc

    There were some issues in my earlier attempt. Perhaps you were testing one of those.

    Edit: Noting that I'm not particularly proud of my brute force attempt. Certainly could be improved.

    Agreed. I just reran that code and it came up with the correct answer. We must have been working simultaneously... the last thing I did was refresh the window and quote your post. As you said, I must have copied the code from the earlier post.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)