+ Reply to Thread
Results 1 to 8 of 8

How to Marge the cells automatically

  1. #1
    Forum Contributor
    Join Date
    07-15-2015
    Location
    Kolkata
    MS-Off Ver
    2010 & 2013
    Posts
    303

    How to Marge the cells automatically

    Hi All,

    i want to marge cells automatically using VBA code when i filter the BD names. For example, if i select the BD name like "Sam" from drop down then the "N6:N16" & "O6:O16" cells are marge and if i select the name like "Ryan" then the "N6:N17" & "O6:O17" cells are marge. last row number depend on the end of the data row number.
    Please help me how to solve the issue
    Attached Files Attached Files

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,475

    Re: How to Marge the cells automatically

    This should do it.

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    07-15-2015
    Location
    Kolkata
    MS-Off Ver
    2010 & 2013
    Posts
    303

    Re: How to Marge the cells automatically

    Thank you so much...Now i want to create border around the marge cell. but i am getting an variable error in this code. please help me where i have done the mistake

    Please Login or Register  to view this content.

  4. #4
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,475

    Re: How to Marge the cells automatically

    Please Login or Register  to view this content.

  5. #5
    Valued Forum Contributor
    Join Date
    07-17-2005
    Location
    Abergavenny, Wales, UK
    MS-Off Ver
    XL2003, XL2007, XL2010, XL2013, XL2016
    Posts
    608

    Re: How to Marge the cells automatically

    @sanjibghosh

    Just modify the code as follows
    Please Login or Register  to view this content.
    --
    Regards
    Roger Govier
    Microsoft Excel MVP

  6. #6
    Forum Contributor
    Join Date
    07-15-2015
    Location
    Kolkata
    MS-Off Ver
    2010 & 2013
    Posts
    303

    Re: How to Marge the cells automatically

    i am getting run-time error '424' object required with this code. please help to resolve

    Please Login or Register  to view this content.

  7. #7
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,475

    Re: How to Marge the cells automatically

    Can you not indicate where you get the error?

  8. #8
    Forum Contributor
    Join Date
    07-15-2015
    Location
    Kolkata
    MS-Off Ver
    2010 & 2013
    Posts
    303

    Re: How to Marge the cells automatically

    Extremely sorry... i did some mistake in this code.

    Thank you so much to help me.

+ 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. how to marge date and time
    By puneet563 in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 08-03-2016, 01:06 AM
  2. Automatically Marge the Cells
    By AmirSoft in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-13-2014, 04:57 AM
  3. [SOLVED] Marge multiple row value in one cel.
    By ganeshkumar in forum Excel General
    Replies: 1
    Last Post: 03-22-2014, 08:51 AM
  4. [SOLVED] AUTOFILTER-Totals on the left down corner marge do not appear
    By Peter Wouters via OfficeKB.com in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 06:05 PM
  5. [SOLVED] AUTOFILTER-Totals on the left down corner marge do not appear
    By Peter Wouters via OfficeKB.com in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 PM
  6. [SOLVED] AUTOFILTER-Totals on the left down corner marge do not appear
    By Peter Wouters via OfficeKB.com in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 11:05 AM
  7. AUTOFILTER-Totals on the left down corner marge do not appear
    By Peter Wouters via OfficeKB.com in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 02:05 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