+ Reply to Thread
Results 1 to 17 of 17

Put space between number and alpha characters

  1. #1
    Registered User
    Join Date
    07-01-2020
    Location
    Riyadh
    MS-Off Ver
    2016
    Posts
    20

    Put space between number and alpha characters

    I need help please. I have a long list of items, I need to insert a space in between numeric and alphacharacters.

    For example: this is one text in a cell:

    SMR (SUBMUCOUS RESECTION) SET KILLIAN NASAL SPECULUM 50MM 2 KILLIAN NASAL SPECULUM 65MM 2 KILLIAN NASAL SPECULUM 75MM 2 KILLIAN NASAL SPECULUM 90MM 2 SCALPEL HANDLE NO.3 2ADSON FRAZIER SUCTION TUBE 2.33MM 2 ADSON FRAZIER SUCTION TUBE 2.6MM 2BACKHAUS TOWEL CLIP 90MM 6RAMPLEY SPONGE HOLDING FCPS 180MM 4 ADSON FORCEPS FINE 1/2TH 127MM 2 JANSON NASAL DRESSING FORCEPS 160MM 2 CRILE ARTERY FORCEPS STR 140MM 2ROCHESTER PEAN ARTERY FCP S COF 165MM 2HALSEY NEEDLE HOLDER 125MM 2 ALLIS TISSUE FORCEPS 5/6TH 150MM 2 JANSEN MIDDLETON SEPTUM FCPS 185MM 2FREE R KNIFE FLAT ROUNDED BLADE 190MM 2BALLENGER KNIFE STR REVOLV BLADE 6X200MM 2 BALLENGER KNIFE STR REVOLV BLADE 8X200MM 2FREER DOUBLE ENDED ELEVATOR 190MM 2MCKENTY RASPATORY DOUBLE ENDED 190MM 2AURAL SNARE COMPLETE WITH WIRE 160MM 2HEYMANN TURB SCISSORS ANGULAR 180MM 2MCINDOE NASAL CHISEL 11MM X152MM 2COTTLE MALLET 190MM 2 ROUND BOWL 0, 4 LITRE 2CONTAINER BOTTOM 3/4 HEIGHT 90MM 2 CONTAINER LID 3/4 2IDENTIFICATION LABEL 2PERFORATED BASKET 3/4 56MM

  2. #2
    Valued Forum Contributor Haluk's Avatar
    Join Date
    02-14-2019
    Location
    Turkiye
    MS-Off Ver
    2010 - 64 Bit on Windows-11 (22 H2) 64 Bit
    Posts
    1,149

    Re: Put space between number and alpha characters

    What will be the desired output ?

  3. #3
    Valued Forum Contributor Haluk's Avatar
    Join Date
    02-14-2019
    Location
    Turkiye
    MS-Off Ver
    2010 - 64 Bit on Windows-11 (22 H2) 64 Bit
    Posts
    1,149

    Re: Put space between number and alpha characters

    Well, you haven't given the desired output, but you can try the following UDF;

    This will convert strings like "75MM" to "75 MM" in your sample text, placed in a cell.

    Please Login or Register  to view this content.
    Usage of the UDF is like below;

    Please Login or Register  to view this content.
    when entered into a cell, say B1 .... the string in cell A1 will be executed and spaces will be added after the numeric characters in alphanumeric strings.
    Last edited by Haluk; 07-01-2020 at 10:07 AM. Reason: typo...

  4. #4
    Registered User
    Join Date
    07-01-2020
    Location
    Riyadh
    MS-Off Ver
    2016
    Posts
    20

    Re: Put space between number and alpha characters

    Just what I needed! Thank you so much.

  5. #5
    Registered User
    Join Date
    07-01-2020
    Location
    Riyadh
    MS-Off Ver
    2016
    Posts
    20

    Re: Put space between number and alpha characters

    What if it's like this:

    Problem:
    ZINC SULPHATE 22.5MG/25MG ELEMENTAL TAB

    Using AddSpace, the result is this:

    ZINC SULPHATE 22 .5 MG/25 MG ELEMENTAL TAB

    It would be best if the result will be:

    ZINC SULPHATE 22 .5 MG/ 25 MG ELEMENTAL TAB

  6. #6
    Valued Forum Contributor Haluk's Avatar
    Join Date
    02-14-2019
    Location
    Turkiye
    MS-Off Ver
    2010 - 64 Bit on Windows-11 (22 H2) 64 Bit
    Posts
    1,149

    Re: Put space between number and alpha characters

    Give this a try;

    Please Login or Register  to view this content.
    Last edited by Haluk; 07-01-2020 at 11:04 AM.

  7. #7
    Valued Forum Contributor Haluk's Avatar
    Join Date
    02-14-2019
    Location
    Turkiye
    MS-Off Ver
    2010 - 64 Bit on Windows-11 (22 H2) 64 Bit
    Posts
    1,149

    Re: Put space between number and alpha characters

    Also note that; in the revised function's returned value, there is no space before the decimal seperator.

  8. #8
    Registered User
    Join Date
    07-01-2020
    Location
    Riyadh
    MS-Off Ver
    2016
    Posts
    20

    Re: Put space between number and alpha characters

    Thank you so much!

  9. #9
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,870

    Re: Put space between number and alpha characters

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

    Also, as a relatively new member of the forum, 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.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  10. #10
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Put space between number and alpha characters

    Haluk's script will add some double spaces. If that's a concern, wrap the function within a TRIM function like so
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  11. #11
    Registered User
    Join Date
    07-01-2020
    Location
    Riyadh
    MS-Off Ver
    2016
    Posts
    20

    Re: Put space between number and alpha characters

    Need to remove space between numbers within a long text

    For example:

    POUCH, STERILIZATION, 3.5X4 4IN, SELF-SEALING, BLUE, TENTED TRANSPARENT FILM, EASY DETECTION, EXTERNAL AND INTERNAL INDICATOR, MULTIPLE SEAL, 10 00POUCHES/BOX

    Desired Output

    POUCH, STERILIZATION, 3.5X44IN, SELF-SEALING, BLUE, TENTED TRANSPARENT FILM, EASY DETECTION, EXTERNAL AND INTERNAL INDICATOR, MULTIPLE SEAL, 1000POUCHES/BOX

  12. #12
    Registered User
    Join Date
    07-01-2020
    Location
    Riyadh
    MS-Off Ver
    2016
    Posts
    20

    Re: Put space between number and alpha characters

    thank you!

  13. #13
    Valued Forum Contributor Haluk's Avatar
    Join Date
    02-14-2019
    Location
    Turkiye
    MS-Off Ver
    2010 - 64 Bit on Windows-11 (22 H2) 64 Bit
    Posts
    1,149

    Re: Put space between number and alpha characters

    Quote Originally Posted by ChemistB View Post
    Haluk's script will add some double spaces. If that's a concern, wrap the function within a TRIM function like so
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Or, you can replace the following with the original and use the UDF as is...

    Please Login or Register  to view this content.
    Last edited by Haluk; 07-01-2020 at 05:30 PM.

  14. #14
    Registered User
    Join Date
    07-01-2020
    Location
    Riyadh
    MS-Off Ver
    2016
    Posts
    20

    Re: Put space between number and alpha characters

    For example:

    POUCH, STERILIZATION, 3.5X4 4IN, SELF-SEALING, BLUE, TENTED TRANSPARENT FILM, EASY DETECTION, EXTERNAL AND INTERNAL INDICATOR, MULTIPLE SEAL, 10 00POUCHES/BOX

    Desired Output


    POUCH, STERILIZATION, 3.5 X 44 IN, SELF-SEALING, BLUE, TENTED TRANSPARENT FILM, EASY DETECTION, EXTERNAL AND INTERNAL INDICATOR, MULTIPLE SEAL, 1000 POUCHES/BOX

  15. #15
    Registered User
    Join Date
    07-01-2020
    Location
    Riyadh
    MS-Off Ver
    2016
    Posts
    20

    Re: Put space between number and alpha characters

    I use the AddSpace and its working fine, please could you also remove the space between numbers inside the cell?

    For example:

    POUCH, STERILIZATION, 3.5X4 4IN, SELF-SEALING, BLUE, TENTED TRANSPARENT FILM, EASY DETECTION, EXTERNAL AND INTERNAL INDICATOR, MULTIPLE SEAL, 10 00POUCHES/BOX

    Desired Output

    POUCH, STERILIZATION, 3.5 X 44 IN, SELF-SEALING, BLUE, TENTED TRANSPARENT FILM, EASY DETECTION, EXTERNAL AND INTERNAL INDICATOR, MULTIPLE SEAL, 1000 POUCHES/BOX

  16. #16
    Valued Forum Contributor Haluk's Avatar
    Join Date
    02-14-2019
    Location
    Turkiye
    MS-Off Ver
    2010 - 64 Bit on Windows-11 (22 H2) 64 Bit
    Posts
    1,149

    Re: Put space between number and alpha characters

    You can try this;

    Please Login or Register  to view this content.

  17. #17
    Registered User
    Join Date
    07-01-2020
    Location
    Riyadh
    MS-Off Ver
    2016
    Posts
    20

    Re: Put space between number and alpha characters

    Thanks a lot! It worked fine.

+ 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. Vlookup string of alpha numerical with a space and sometimes without
    By Thom7890 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-11-2019, 10:21 PM
  2. [SOLVED] How to pull Alpha characters from a alpha-numeric string
    By roxdrob01 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-11-2019, 01:11 AM
  3. [SOLVED] Replace non alpha and numberic characters with space
    By ImranBhatti in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-07-2018, 08:13 AM
  4. Replies: 5
    Last Post: 02-02-2017, 09:11 PM
  5. [SOLVED] extraction of number from cell containing alpha-numeric character with space
    By Astaa in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-14-2013, 02:31 AM
  6. Split field based on number of characters and space
    By william_mailer in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-08-2006, 01:22 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