+ Reply to Thread
Results 1 to 4 of 4

Formula for adding space between last number and first letter in cell

  1. #1
    Registered User
    Join Date
    09-14-2020
    Location
    England
    MS-Off Ver
    365
    Posts
    6

    Formula for adding space between last number and first letter in cell

    Hi all

    I have the following formula for adding a space between the last number and first letter in a given cell:

    =TRIM(REPLACE(H2,MIN(FIND({1,2,3,4,5,6,7,8,9,0},H2&"1234567890")),0," "))

    I am trying to use it to add a space in a list of measurements:

    25g
    100g
    1g
    250mg
    100mg
    10g
    1g
    10ug

    I am struggling to get the formula to work properly. At the moment, it is outputting the same as the source cell.

    Can anyone advise on where I've gone wrong?

    Thanks so much!

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,446

    Re: Formula for adding space between last number and first letter in cell

    You need to use
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Entered as an array formula with Ctrl+Shift+Enter
    Your formula works when text precedes numbres

  3. #3
    Registered User
    Join Date
    09-14-2020
    Location
    England
    MS-Off Ver
    365
    Posts
    6

    Re: Formula for adding space between last number and first letter in cell

    Fantastic, thank you! Works like a charm

  4. #4
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,446

    Re: Formula for adding space between last number and first letter in cell

    You're welcome

+ 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. [SOLVED] adding letter and number in an excel cell
    By eugchen in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-20-2020, 08:26 PM
  2. [SOLVED] Insert singe space between number and letter in a list of addresses
    By soreno in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-31-2018, 05:36 AM
  3. Replies: 25
    Last Post: 04-21-2015, 10:19 AM
  4. Formula to return characters after a letter and before the first space
    By jimmyb555 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-14-2014, 07:04 PM
  5. Remove Space between number and letter on excel spreadsheet
    By BowHunter09 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-31-2013, 09:06 PM
  6. Replies: 8
    Last Post: 11-02-2010, 09:51 AM
  7. Putting a space before a letter, after a number
    By Monkey106 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-01-2010, 06:33 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