Closed Thread
Results 1 to 8 of 8

How to remove the space inbetween numbers

  1. #1
    Registered User
    Join Date
    06-13-2012
    Location
    California
    MS-Off Ver
    Excel 2003
    Posts
    70

    How to remove the space inbetween numbers

    A b c d
    4 3 1* * 8 2 6 * * 6 6 1 * * 228
    4 4 1* * 8 5 3 * * 3 9 8 * * 4 9 4 * *
    1 2 5* * 5 0 7 * * 7 2 3 * * 1 4 9 * *
    1 8 1* * 7 7 3 * * 9 8 3 * * 0 1 0 * *

    I have column A, B, C and D.... How to remove space of A, B, C D of numbers

  2. #2
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2404
    Posts
    13,406

    Re: How to remove the space inbetween numbers

    Try

    =SUBSTITUTE(A1," ","")

    Fill across and down.
    Dave

  3. #3
    Forum Expert
    Join Date
    11-26-2013
    Location
    Colac, Victoria, Australia
    MS-Off Ver
    Excel 2016
    Posts
    1,309

    Re: How to remove the space inbetween numbers

    I can't tell whether the spaces are embedded (that is in a column, you have number space number), or they are leading or trailing spaces.

    @FlameRetired suggested SUBSTITUTE.

    I think this will give you text.

    If you want to have a number, you could use =VALUE(A1) which will ignore the leading or trailing spaces. It won't work with embedded spaces.
    You would need to combine the two thus: =VALUE(SUBSTITUTE(A1," ",""))

    I hope this helps, please let me know!

    Regards,

    David

    If this has been helpful
    - Please click on the *Add Reputation button at the bottom left.

    Please mark your thread as SOLVED:
    - Click Thread Tools above your first post, select "Mark your thread as Solved".


  4. #4
    Registered User
    Join Date
    03-26-2016
    Location
    São Paulo - Brazil
    MS-Off Ver
    2016
    Posts
    48

    Re: How to remove the space inbetween numbers

    Uday1969

    Use this TRIM function

    =TRIM(A1)

    Decio

  5. #5
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: How to remove the space inbetween numbers

    Like deciog says - the WorksheetFunction Trim will remove internal spaces but the VBA Trim will not
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  6. #6
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2404
    Posts
    13,406

    Re: How to remove the space inbetween numbers

    Quote Originally Posted by uday1969 View Post
    A b c d
    4 3 1* * 8 2 6 * * 6 6 1 * * 228
    4 4 1* * 8 5 3 * * 3 9 8 * * 4 9 4 * *
    1 2 5* * 5 0 7 * * 7 2 3 * * 1 4 9 * *
    1 8 1* * 7 7 3 * * 9 8 3 * * 0 1 0 * *

    I have column A, B, C and D.... How to remove space of A, B, C D of numbers
    uday1969 the more I look at this the more I wonder. What do the "*" characters represent in the example? Are they spaces or literal "*"s?

    Can you also post the desired output ... indicating if they are to be text (including or excluding "*"s) or numbers as David A Coop pointed out?

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

    Re: How to remove the space inbetween numbers

    Please help, 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

  8. #8
    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
    81,090

    Re: How to remove the space inbetween numbers

    You are pushing your luck now. You already have your own thread on this.
    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.

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Finding specific text, remove a row and add two rows inbetween
    By Louisa Venter in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 10-21-2015, 07:11 AM
  2. [SOLVED] Remove numbers from a string that are preceded by a space
    By joevan1 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 01-19-2015, 03:14 AM
  3. [SOLVED] How to remove empty space, unable to make pvot, because pvot calculate empty space
    By vengatvj in forum Excel Charting & Pivots
    Replies: 20
    Last Post: 10-29-2013, 12:43 PM
  4. Count if any of these numbers are inbetween two numbers
    By Bauxitebill in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-18-2013, 12:58 PM
  5. [SOLVED] If Cell Starts with a Space, remove that space
    By Ocean Zhang in forum Excel General
    Replies: 2
    Last Post: 09-29-2012, 01:52 PM
  6. Remove space after numbers
    By ulhotboy1 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-02-2012, 12:58 PM
  7. VBA Extract Numbers only from Cell and Insert spaces Inbetween (Getnumbers)
    By jamieray in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-26-2012, 06:53 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