+ Reply to Thread
Results 1 to 5 of 5

Add trim clean to my formula

  1. #1
    Forum Contributor
    Join Date
    11-13-2015
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    831

    Add trim clean to my formula

    Hi guys

    I can't seem to get trim/clean working to remove the space in my fomrula? can anyone advise why?

    =IFERROR(INDEX($A$2:$A$100,MATCH(SMALL(NOT($A$2:$A$100="")*IF(ISNUMBER($A$2:$A$100),COUNTIF($A$2:$A$100,"<="&$A$2:$A$100),COUNTIF($A$2:$A$100,"<="&$A$2:$A$100)+SUM(--ISNUMBER($A$2:$A$100))),ROWS($A$2:A2)+SUM(--ISBLANK($A$2:$A$100))),NOT($A$2:$A$100="")*IF(ISNUMBER($A$2:$A$100),COUNTIF($A$2:$A$100,"<="&$A$2:$A$100),COUNTIF($A$2:$A$100,"<="&$A$2:$A$100)+SUM(--ISNUMBER($A$2:$A$100))),0)),"")

    I want to remove the space in front of the output in cell C2

    thank yuo
    Attached Files Attached Files
    Thanks,

    R.



  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,460

    Re: Add trim clean to my formula

    The column of cells has a left indent applied. Change cell formatting on the alignment tab to general.
    Attached Files Attached Files
    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 Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,151

    Re: Add trim clean to my formula

    =iferror(trim(index($a$2:$a$100,match(small(not($a$2:$a$100="")*if(isnumber($a$2:$a$100),countif($a$2:$a$100,"<="&$a$2:$a$100),countif($a$2:$a$100,"<="&$a$2:$a$100)+sum(--isnumber($a$2:$a$100))),rows($a$2:a2)+sum(--isblank($a$2:$a$100))),not($a$2:$a$100="")*if(isnumber($a$2:$a$100),countif($a$2:$a$100,"<="&$a$2:$a$100),countif($a$2:$a$100,"<="&$a$2:$a$100)+sum(--isnumber($a$2:$a$100))),0))),"")

  4. #4
    Forum Contributor
    Join Date
    11-13-2015
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    831

    Re: Add trim clean to my formula

    thank you Ali!

  5. #5
    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,460

    Re: Add trim clean to my formula

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

+ 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. vbYesNo + Clean and Trim Selection
    By jrean042 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-26-2019, 08:40 AM
  2. [SOLVED] formula or vba to trim clean description column from specific wording
    By JEAN1972 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-22-2018, 04:46 AM
  3. Using TRIM, SUBSTITUTE & CLEAN
    By scarames in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-18-2014, 03:13 PM
  4. When TRIM() and CLEAN() fail.
    By fhalejr in forum Excel General
    Replies: 7
    Last Post: 01-02-2014, 02:12 AM
  5. [SOLVED] Clean and Trim Not Working
    By HangMan in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 01-05-2013, 07:14 PM
  6. Can't 'trim' or 'clean' spaces
    By [email protected] in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-05-2010, 07:06 PM
  7. Clean and Trim
    By tl7410 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-02-2009, 03:03 PM

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