+ Reply to Thread
Results 1 to 5 of 5

TRIM FUNCTION TO PULL OUT 3rd KEY DATA from each cell.

  1. #1
    Registered User
    Join Date
    10-05-2014
    Location
    UK
    MS-Off Ver
    2013
    Posts
    12

    TRIM FUNCTION TO PULL OUT 3rd KEY DATA from each cell.

    Hi,

    I have a test spreadsheet I'm trying to use the TRIM Function for to extra the third piece of data from each cell from A2 across and down.

    However I can't get it to work correctly and my knowledge of the TRIM function is limited and I can't work out where I'm going wrong.

    My example book shows the data I want in sheet 1 highlighted in red. this is replicated down a few rows and would also apply to each column to the right for each calendar day.

    In sheet 2 I have the trim formula (not working) trying to delete out the data I don't want to leave the corresponding correct data as highlighted in red in sheet1.

    Any help appreciated.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,844

    Re: TRIM FUNCTION TO PULL OUT 3rd KEY DATA from each cell.

    Try this:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    <----- If you were helped by my posts you can say "Thank you" by clicking the star symbol down to the left

    If the problem is solved, finish of the thread by clicking SOLVED under Thread Tools
    I don't wish to leave you with no answer, yet I sometimes miss posts. If you feel I forgot you, remind me with a PM or just bump the thread.

  3. #3
    Registered User
    Join Date
    10-05-2014
    Location
    UK
    MS-Off Ver
    2013
    Posts
    12

    Re: TRIM FUNCTION TO PULL OUT 3rd KEY DATA from each cell.

    Thanks, unfortunately this doesn't quite work as not every cell in sheet 1 contains the same amounts of data. e.g. most cells will have 3 or 4 bits of data. It is always the 3rd bit of data that is needed but the Trim formula suggested is it appears looking for the 4th piece of data not the 3rd.

  4. #4
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: TRIM FUNCTION TO PULL OUT 3rd KEY DATA from each cell.

    B2=TRIM(IFERROR(MID(SUBSTITUTE(SUBSTITUTE(Sheet1!B2," ","^",2)," ",REPT(" ",256),2),FIND("^",SUBSTITUTE(Sheet1!B2," ","^",2))+1,256),""))
    TRY THIS AND COPY ACROSS
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  5. #5
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: TRIM FUNCTION TO PULL OUT 3rd KEY DATA from each cell.

    OR CAN TRY
    =TRIM(MID(SUBSTITUTE(Sheet1!B2," ",REPT(" ",LEN(Sheet1!B2))),2*LEN(Sheet1!B2)+1,LEN(Sheet1!B2)))

+ 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. I need a function to pull data from a cell on a different worksheet
    By Jane H in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-09-2015, 05:22 PM
  2. Replies: 6
    Last Post: 07-31-2014, 01:27 PM
  3. Replies: 1
    Last Post: 07-03-2014, 04:32 AM
  4. [SOLVED] Pull data from a cell relative to a function
    By cooder187 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-05-2014, 02:10 AM
  5. Excel Function to trim cell data
    By andrew8008 in forum Excel General
    Replies: 3
    Last Post: 01-12-2009, 01:21 AM

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