+ Reply to Thread
Results 1 to 6 of 6

As per selection add row and merge few columns

  1. #1
    Forum Contributor
    Join Date
    12-27-2008
    Location
    India
    MS-Off Ver
    Office 365
    Posts
    237

    As per selection add row and merge few columns

    Hi,

    I have requirement as per the selection of numbers ; row should insert and do the merging where it is required as per attach file with explanation.


    Add rows & merge.xlsb

    Will be happy someone give his/her time to solve the thread.

    Regards, RL

  2. #2
    Forum Contributor
    Join Date
    02-09-2014
    Location
    Kamnik, Slovenia
    MS-Off Ver
    Excel 2010
    Posts
    693

    Re: As per selection add row and merge few columns

    hi rr1050,

    see this code in my sample, I created only for separation 2, but you can do It yourself for other cases:

    Please Login or Register  to view this content.
    I used only merge method, but I can do insert method too. See attached sample, you have to select value 2 and click anywhere on sheet. Code is not pretty, but It works
    Attached Files Attached Files
    Last edited by Lukael; 11-02-2014 at 10:27 AM.

  3. #3
    Forum Contributor
    Join Date
    12-27-2008
    Location
    India
    MS-Off Ver
    Office 365
    Posts
    237

    Re: As per selection add row and merge few columns

    Hi, Thanks I got concept!

    But attach file, I do not understand.

  4. #4
    Forum Contributor
    Join Date
    09-11-2013
    Location
    Germany
    MS-Off Ver
    Excel 2007
    Posts
    265

    Re: As per selection add row and merge few columns

    Hi.

    This does everything for the First instance, I am trying to work out how to loop it for the rest

    Maybe some Expert can point us in the right direction

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    09-11-2013
    Location
    Germany
    MS-Off Ver
    Excel 2007
    Posts
    265

    Re: As per selection add row and merge few columns

    This Should do everything now.

    Please Login or Register  to view this content.
    Paste into Standard Module.

    Alt + F8 then Run

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,049

    Re: As per selection add row and merge few columns

    Just wanted to add in that using merged cells is never a good idea, it can cause all sorts of problems with formulas - just something to keep in mind
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ 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 duplicate rows and merge the columns (approx 10 columns)
    By adfeddon in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-02-2012, 11:19 AM
  2. Macro for summation of few(4) columns based on selection criteria of two columns
    By nitz00757 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-18-2012, 04:22 AM
  3. Wrong Row Selection when Cells Merge Available
    By ignavi in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-29-2011, 09:56 AM
  4. Merge Cells to Dynamic Selection
    By aftabn10 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-09-2011, 11:18 AM
  5. [SOLVED] merge text from 2 columns into 1 then delete the old 2 columns
    By sleepindogg in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-30-2006, 02:30 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