+ Reply to Thread
Results 1 to 7 of 7

Formula to structure messy CSV export and extract key information

  1. #1
    Registered User
    Join Date
    04-16-2013
    Location
    UK
    MS-Off Ver
    2016
    Posts
    9

    Formula to structure messy CSV export and extract key information

    Hi all,
    For some reason my bank's csv export is quite messy. I have tried to create a formula to extract the most important transactions related information (such as, transaction date, transaction counterparty and transaction amount).

    It works for the majority of the transactions. However, some transactions are reported slightly different and the formula fails. The idea is to store this document online and update it via excel online in the most convenient way possible.

    I attached a file with examples. The first two rows work perfectly, the subsequent rows don't work.

    Perhaps someone has a solution to this problem.

    Thanks in advance!
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    10-09-2014
    Location
    Newcastle, England
    MS-Off Ver
    2003 & 2013
    Posts
    1,986

    Re: Formula to structure messy CSV export and extract key information

    Based on the sample you've supplied, text to Columns seems to work perfectly. Apologies if I'm missing something
    If someone has helped you then please add to their Reputation

  3. #3
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Formula to structure messy CSV export and extract key information

    Hi

    Have you tried using [Text to columns] on the Data tab?

    Is your original data in a single column or in multiple columns?

  4. #4
    Registered User
    Join Date
    04-16-2013
    Location
    UK
    MS-Off Ver
    2016
    Posts
    9

    Re: Formula to structure messy CSV export and extract key information

    Quote Originally Posted by pjwhitfield View Post
    Based on the sample you've supplied, text to Columns seems to work perfectly. Apologies if I'm missing something
    Apologies - I should have been more clear:

    Date is correct across all columns. The other variables are incorrect.

    Row 7:
    - Counterparty should be "BANKXXX"
    - Account number should be "IBANYYY"
    - Amount should be 25,068.80

    Row 8:
    - No Counterparty mentioned ("")
    - Account number 61150020
    - Amount should be 168.00

    Row 9:
    - No Counterparty mentioned ("")
    - Account number IBANYYY
    - Amount should be 16,612.06

    Row 10:
    - No Counterparty mentioned ("")
    - Account number not mentioned ("")
    - Amount should be 16,427.31



    Also, I want to avoid any manual manipulation (such as text to columns), as I want to make it as efficient as possible.

  5. #5
    Forum Expert
    Join Date
    10-09-2014
    Location
    Newcastle, England
    MS-Off Ver
    2003 & 2013
    Posts
    1,986

    Re: Formula to structure messy CSV export and extract key information

    Would you be willing to upload one of the original CSV files? It's quite hard to establish what exactly happens from an amended version?

    You could go into the file in Notepad etc and amend the personal info beforehand.

  6. #6
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Formula to structure messy CSV export and extract key information

    Try this

    In H12 concatenate data
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    In K12 use
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    In L12:Z17 (L12:AA17) use
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    See the file
    Attached Files Attached Files
    Last edited by José Augusto; 10-30-2018 at 05:36 PM. Reason: Correct formula to get the last field (in red)

  7. #7
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Formula to structure messy CSV export and extract key information

    Hi
    To adjust the fields of the two groups (first group has eleven fields and the other seventeen) you can use the following approximation
    In I12 place the concatenation of your data
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    in H12 use the following formula
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    All other formulas remain.
    See the file
    Attached Files Attached Files

+ 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. Need a Formula to extract information from one sheet to another
    By slock92 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 10-03-2016, 02:47 PM
  2. Replies: 5
    Last Post: 06-26-2016, 12:52 AM
  3. Replies: 6
    Last Post: 01-12-2015, 12:36 PM
  4. Messy Big Data to Structure Data
    By kenjichan in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-27-2014, 08:28 PM
  5. Replies: 3
    Last Post: 09-09-2013, 03:43 AM
  6. Array formula to extract information in-between two dates
    By Kayees in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-25-2013, 05:00 AM
  7. Replies: 1
    Last Post: 08-07-2008, 02:11 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