+ Reply to Thread
Results 1 to 5 of 5

Merge cells with separator in a VBA code

  1. #1
    Registered User
    Join Date
    09-12-2018
    Location
    Nottingham UK
    MS-Off Ver
    2010
    Posts
    9

    Merge cells with separator in a VBA code

    Hi

    I'm trying to get this to be entered into a cell once a form is refreshed in VBA but VBA doesn't Like the ,

    .Range("H8") = "=E2&","&E8&","&H2"

    Thanks in advance
    Last edited by sid6478; 05-14-2021 at 07:43 AM. Reason: solved

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,385

    Re: Merge cells with separator in a VBA code

    Try:
    Please Login or Register  to view this content.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Expert
    Join Date
    05-29-2020
    Location
    NH USA
    MS-Off Ver
    365
    Posts
    2,103

    Re: Merge cells with separator in a VBA code

    Try it this way

    Please Login or Register  to view this content.

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,385

    Re: Merge cells with separator in a VBA code

    Thanks for the rep.

  5. #5
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Cool Re: Merge cells with separator in a VBA code


    Hi !

    [H8] = [E2&","&E8&","&H2]

+ 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] Merge cells with same value, old code needs rework.
    By johansoder in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-23-2014, 09:14 AM
  2. Merge Rows Into a single column with Separator Based on Spaces
    By Philody in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-01-2014, 06:18 PM
  3. VB Code to un-merge cells
    By rizmomin in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-12-2013, 05:39 PM
  4. [SOLVED] Macro to Merge multiple columns together with separator
    By ucsutah in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-16-2012, 12:15 AM
  5. merge two cells into one with separator "="
    By infact in forum Excel General
    Replies: 9
    Last Post: 04-04-2012, 06:27 AM
  6. merge columns with coma as a separator
    By Betinka in forum Excel General
    Replies: 6
    Last Post: 02-04-2011, 07:58 AM
  7. Macro to merge 400 cells into one with a "; " separator
    By th3w4cko in forum Excel General
    Replies: 6
    Last Post: 11-16-2010, 06:21 AM

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