+ Reply to Thread
Results 1 to 6 of 6

Trim Function

  1. #1
    Forum Contributor
    Join Date
    01-28-2013
    Location
    Spencerport, NY
    MS-Off Ver
    Excel 2016
    Posts
    270

    Trim Function

    Hello All
    Could use some help with the trim function ( I think)
    Attached you will find a data set that was imported with the < symbol and the text "min" in columns C and D. I wish to drop the < sign and the word "min" from every cell that contains these criteria in columns C and D and place the values in their respective columns of E and F so that I may total the time in Column G. You will see that I am using the TRIM function to drop the "min" text but dont know how to drop the < symbol when it is present in the column.
    Any help is appreciated.
    Thanks in advance
    Ron
    Attached Files Attached Files

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,084

    Re: Trim Function

    How do you want <1 to be treated? As zero, or as something else?
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: Lá fhéile Pádraig sona dhaoibh

  3. #3
    Forum Contributor
    Join Date
    01-28-2013
    Location
    Spencerport, NY
    MS-Off Ver
    Excel 2016
    Posts
    270

    Re: Trim Function

    Sorry Glenn....I would like it to be treated as a 1

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,084

    Re: Trim Function

    Mmmm. Not sure if I agree, but hey! It's your call:

    =SUM(SUBSTITUTE(SUBSTITUTE(B2:D2,"min",""),"<","")+0)

    This is an array formula. Array Formulae are a little different from ordinary formulae in that they MUST be confirmed in the FIRST CELL ONLY by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. After that, the array can be dragged down as normal, to cover the desired range.

    You will know the array is active when you see curly brackets { } - or "curly braces" for those of you in the USA, or "flower brackets" for those of you in India - appear around the outside of your formula. If you do not use CTRL+SHIFT+ENTER you will (almost always) get an error message or an incorrect answer. Press F2 on that cell and try again.

    Don't type the curly brackets yourself - it won't work...
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    01-28-2013
    Location
    Spencerport, NY
    MS-Off Ver
    Excel 2016
    Posts
    270

    Re: Trim Function

    Bingo ! I know where you are coming from Glenn, but in this case anything greater than 1 second is considered 1 minute Thanks Glenn. Very much appreciate the lesson about array formulae !

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,084

    Re: Trim Function

    Im an analytical chemist. < has a different meaning for us...
    Anyhow. You're welcome and thanks for the rep.

+ 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. Trim function ?
    By Ron Purpura in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 09-11-2017, 08:18 PM
  2. Replies: 8
    Last Post: 01-22-2017, 08:02 PM
  3. Replies: 4
    Last Post: 10-08-2013, 05:10 PM
  4. trim function
    By noobnxcl in forum Excel General
    Replies: 5
    Last Post: 02-11-2009, 04:21 AM
  5. Trying to trim a trailing space char and the Trim function isn't working
    By Psychochook in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-30-2007, 11:28 PM
  6. Replies: 3
    Last Post: 12-29-2005, 11:10 PM
  7. Trim Function
    By Steved in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 10:05 AM

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