+ Reply to Thread
Results 1 to 7 of 7

Rearrange non standard data to a format "text to columns" will recognize

  1. #1
    Registered User
    Join Date
    03-20-2006
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 365 and Excel 2007
    Posts
    7

    Rearrange non standard data to a format "text to columns" will recognize

    Hi again gang,

    Last dilemma I'm having with a data migration spreadsheet:
    We have data in a cell that should include 3 separate expiration dates, some cells have all 3 dates in the right order, some have all 3 dates out of order and some are missing the dates... I was working unsuccessfully to try and format them into similar formatting, then sort the data by row using "text to column" such that I get all 3 columns populated with the appropriate date and cell missing a date with some N/A or MISSING note.

    The attached spreadsheet has the first few rows and columns are what I need the output to look like.

    I appreciate all the help.
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,969

    Re: Rearrange non standard data to a format "text to columns" will recognize

    Which version of Excel are you using? Please update your user profile.

    Administrative Note:

    Although we value your privacy as much you do, it could be important that members have a rough idea of your location as the solutions they offer may be affected by your locale. For instance, you might in the future post questions which are related to your regional settings.

    With this in mind, please update your profile to something more precise (something such as UK, Europe, USA, UAE, etc. will suffice).

    Thank you for helping us to help you.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,736

    Re: Rearrange non standard data to a format "text to columns" will recognize

    Are you saying that the first 3 rows of your file are what you want to end up with (i.e. dates in the correct column), and that rows 5 to 25 are what you might end up with after doing text-to-columns, and that rows from 26 onwards is what your data looks like to start with (i.e. up to 3 dates in a single cell, with 2 line-feeds between and maybe some #N/A errors?

    Pete

  4. #4
    Registered User
    Join Date
    03-20-2006
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 365 and Excel 2007
    Posts
    7

    Re: Rearrange non standard data to a format "text to columns" will recognize

    Exactly Pete,

    The top 3 rows are the desired outcome.
    ROw 5-25 are what I get if I manually adjust the data in cell A# to get it into comma delimited format and just "text to column" - my thought was maybe I could then sort by row?
    Column A of Rows 26 on are the data as the software exports them ... I tried unsuccessfully to use replace and TRIM to eliminate the extra spaces and to replace the "yyyy-mm-dd" dates with "yyyy-mm-dd," ... and so I turn to you guys, who as I continue to learn the power of Excel and equally my own current limitations, I figure in one nested formula you guys can achieve what I've already spent hours unsuccessfully on. This is just a portion of the much larger dataset.

    The reality is that so often I give up and just spend the time manually manipulating the data, because its faster than learning how to use the proper function/formula... but as I'm back in the office of the family's small business full time again, I'm determined to learn this time.
    Last edited by donojohn; 10-21-2019 at 01:28 PM.

  5. #5
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,736

    Re: Rearrange non standard data to a format "text to columns" will recognize

    Using your existing file, I put the headings Bordetella , DHPP , and Rabies in cells D1, E1 and F1, and then used this formula in cell D26:

    =IF($A26="N/A","#N/A",IF(COUNTIF($A26,"*"&D$1&"*"),MID($A26,SEARCH(D$1,$A26),LEN(D$1)+12),""))

    This can then be copied across into E26 and F26, and then the 3 formulae can be copied down to row 36.

    No need for Text-to-columns, or TRIM etc.

    Hope this helps.

    Pete

    EDIT: file attached …
    Attached Files Attached Files
    Last edited by Pete_UK; 10-21-2019 at 02:00 PM.

  6. #6
    Registered User
    Join Date
    03-20-2006
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 365 and Excel 2007
    Posts
    7

    Re: Rearrange non standard data to a format "text to columns" will recognize

    Wow Pete - Thank you! I will spend the next few hours following the logic through on the formula, but wow. I am truly appreciative!

  7. #7
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,736

    Re: Rearrange non standard data to a format "text to columns" will recognize

    Glad to help, and thanks for marking the thread as solved.

    You might also like to know that you can directly thank those who have helped you by clicking on the small "star" icon located in the lower left corner of a post that you have found to be helpful (not just in this thread - for any post that has helped you). This also adds to the reputation of the poster (the small green bars in the poster's profile).

    Pete

+ 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. extracted TEXT using Index and Row formula, unable to recognize as "TEXT"
    By bala04msw in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-03-2016, 02:01 PM
  2. [SOLVED] How to convert date format "20150501" to standard date format "01-MAY-15"
    By kartsag09 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 02-20-2016, 12:54 PM
  3. Date format of just "st" "nd" "rd" and "th" with text included
    By notrandom in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-10-2013, 05:45 PM
  4. Replies: 0
    Last Post: 08-22-2012, 03:40 PM
  5. [SOLVED] Set default data format to "text" instead of "general"
    By Delta in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-04-2012, 02:44 PM
  6. Rearrange format with "TRIM" and "SUBTRACT" functions
    By Vittorio in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-08-2011, 07:37 PM
  7. Recognize "formulas "result" as "typed data", through and through.
    By gandolff in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-13-2009, 01:30 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