+ Reply to Thread
Results 1 to 4 of 4

MACRO to group bank statements by transaction.... HELP!

  1. #1
    Registered User
    Join Date
    07-09-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2003
    Posts
    8

    Red face MACRO to group bank statements by transaction.... HELP!

    Dear Excel Experts.

    I'm desperately in need of some assistance before my tiny little head explodes!

    Essentially I am trying to sort a number of bank statements which have been scanned through OCR onto excel. The data for each transaction is split over (in most cases) several rows.

    I am looking to combine (rather than merge) all rows relating to individual transactions so that each row contains data for a unique transaction.

    This is quite a tricky conundrum to explain, so hopefully the attached will clarify my issue.... (please see the xlsx file; I uploaded the other file by mistake, and can't for the life of me delete it!)

    As you will see from Sheet 'OCR,' the data I have is not aligned and quite difficult to interpret exactly what information belongs with which... the date for each transaction is actually held in the last row of applicable data, rather than the first. If you look on Sheet 'Grouped Transactions' I have marked the cells which actually belong together as relating to the same transaction. On Sheet 'Merged Transactions' you will see how I intended the data to look.

    I did originally consider using a different column (rather than date) to dictate which rows belonged with which, however the date entry is the only constant in the data I have - not all transactions have data in each column, hence this turned out to be a bit of a catastrophe.

    I'm desperate for a macro to help me sort this. I have about 2000 rows in total in my original.

    I think I could run another macro which would solve this, if only I could get the date to appear at the beginning, rather than end, of each transaction detail.

    Please, please help!
    Attached Files Attached Files
    Last edited by lozoroo; 07-15-2012 at 03:30 PM.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: MACRO to group bank statements by transaction.... HELP!

    Why not download statements as csv files?

    How's Nottingham by the way?
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    07-09-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: MACRO to group bank statements by transaction.... HELP!

    Quote Originally Posted by royUK View Post
    Why not download statements as csv files?

    How's Nottingham by the way?
    Doesn't work I'm afraid, plus I'll be needing to do this on a regular basis, and don't have personal access to the OCR.

    Nottingham... cloudy, overcast, with a slight teasing of sun.

    Imagine Derby is the same

  4. #4
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: MACRO to group bank statements by transaction.... HELP!

    Hi lozoroo

    I only picked up on this 'cause it looked like an interesting exercise...well, it quickly became convoluted as is the code in the attached. The code does work on your sample .xlsx file. However, I can't believe it'll work in the real world...too many unknowns to program for. You're welcome to try the code on a copy of your real file...let me know how it goes.
    Attached Files Attached Files
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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