+ Reply to Thread
Results 1 to 7 of 7

Cancel splitting column and return splitting to general

  1. #1
    Forum Contributor
    Join Date
    11-14-2021
    Location
    africa
    MS-Off Ver
    2016 & 2019
    Posts
    255

    Cancel splitting column and return splitting to general

    hello
    I need macro to merge the column B,C,D into one column as the result in column G:I when run the macro from the first time and if I run again , then should return splitting column into multiple columns as the orginal data in columns A: E . the output should be in the same range in columns A: E .
    thanks
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,152

    Re: Cancel splitting column and return splitting to general

    How do we know if it is the first or any other run? (2 macros probably): and converting H back to C:E will be difficult as there is no UNIQUE delimiter for separating the data: blank cannot be used as individual parts themselves contain blanks.
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  3. #3
    Forum Contributor
    Join Date
    11-14-2021
    Location
    africa
    MS-Off Ver
    2016 & 2019
    Posts
    255

    Re: Cancel splitting column and return splitting to general

    How do we know if it is the first or any other run?
    the first is the original data , my request as in undo after run the macro . it depends on two cases the orginal and the result in G:I , but the idea when run the macro repeatedly just show the orginal and the result ,if press first time then should show the result ,if I run again return the orginal .
    I hope this is logical .

  4. #4
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,176

    Re: Cancel splitting column and return splitting to general

    I suppose it can be simplified...
    Also, why has your data always got leading and trailing spaces...I removed them to get this to work...

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  5. #5
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,176

    Re: Cancel splitting column and return splitting to general

    Or perhaps a bit unorthodox...Using your sample file above...
    Please Login or Register  to view this content.
    Last edited by sintek; 04-09-2022 at 01:22 PM.

  6. #6
    Forum Contributor
    Join Date
    11-14-2021
    Location
    africa
    MS-Off Ver
    2016 & 2019
    Posts
    255

    Re: Cancel splitting column and return splitting to general

    @sintek
    Also, why has your data always got leading and
    sorry ! about trailing spaces , actually I use the same file . I make sure to remove them in the future .
    perfect ! the code in post#4 is excellent, this is what I look for it
    the code #5 is good , who knows may be need in the future
    thanks for two choices .
    have a good weekend !

  7. #7
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,176

    Re: Cancel splitting column and return splitting to general

    Post 5 is better choice...Works for your file as is...spaces and all...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. Splitting cells with EVERY carriage return
    By joebreaker in forum Excel General
    Replies: 6
    Last Post: 09-30-2017, 09:04 AM
  2. [SOLVED] splitting a cell that has many values separated by a carriage return
    By Nerpilis in forum Excel General
    Replies: 2
    Last Post: 07-01-2013, 11:44 AM
  3. Carriage return splitting into different rows
    By [email protected] in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-15-2011, 01:29 AM
  4. splitting cell data at carriage return points
    By rich80 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-17-2008, 03:29 AM
  5. Splitting a Column into 3
    By Katoomba Blue in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-21-2007, 10:08 AM
  6. [SOLVED] Carriage Return and Splitting Lines to Lotus Notes Msg through VBA
    By skiloa in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-08-2005, 11:05 AM
  7. column splitting
    By holly in forum Excel General
    Replies: 3
    Last Post: 03-01-2005, 08:06 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