+ Reply to Thread
Results 1 to 8 of 8

Combine cell with space between

  1. #1
    Forum Contributor
    Join Date
    01-29-2019
    Location
    Drenthe, Netherlands
    MS-Off Ver
    Dutch Office 2019
    Posts
    291

    Combine cell with space between

    In VBA i cobine to cells to one. But i want a space between. I tried this but it doesn't work.

    Please Login or Register  to view this content.

  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. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,397

    Re: Combine cell with space between

    Just a punt - did you try doubling up?

    Please Login or Register  to view this content.
    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 Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,909

    Re: Combine cell with space between

    Why would you keep changing the same cell (range("P17")) in a loop. Where does i come from in the second part of the codeline ?

    Did you try Space(1) instead ?
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

  4. #4
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,909

    Re: Combine cell with space between

    Just noticed that there's a space after the H in second part. Remove that and you're fine.

  5. #5
    Forum Contributor
    Join Date
    01-29-2019
    Location
    Drenthe, Netherlands
    MS-Off Ver
    Dutch Office 2019
    Posts
    291

    Re: Combine cell with space between

    Quote Originally Posted by bakerman2 View Post
    Why would you keep changing the same cell (range("P17")) in a loop. Where does i come from in the second part of the codeline ?

    Did you try Space(1) instead ?
    The complete script.
    Please Login or Register  to view this content.
    The & "" "" & isn't working

  6. #6
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,909

    Re: Combine cell with space between

    Read my Post #4.

  7. #7
    Forum Contributor
    Join Date
    01-29-2019
    Location
    Drenthe, Netherlands
    MS-Off Ver
    Dutch Office 2019
    Posts
    291

    Re: Combine cell with space between

    Quote Originally Posted by bakerman2 View Post
    Read my Post #4.
    I didn't saw it but yep that is it! Tanks

  8. #8
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,909

    Re: Combine cell with space between

    You're welcome and thanks for 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. combine 2 cells together and add a space inbetween
    By muss1210 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-23-2019, 10:37 AM
  2. Combine 2 cells but only data before space from one cell
    By anna78red in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 08-20-2015, 04:20 PM
  3. [SOLVED] Forgotten this , combine two cell with space
    By makinmomb in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-14-2014, 04:38 AM
  4. [SOLVED] Combine text space problem
    By IKZOUHETNIETWETEN in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-01-2014, 12:02 PM
  5. Replies: 4
    Last Post: 09-26-2013, 04:15 PM
  6. [SOLVED] How to separate last combine characters which is separated by space
    By nur2544 in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 02-08-2013, 10:20 AM
  7. Combine multiple rows into one and seprate columns by space deliminator
    By ahad_bwp in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-24-2012, 06:35 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