+ Reply to Thread
Results 1 to 3 of 3

column width macro in merged cell seems to have problem

  1. #1
    Registered User
    Join Date
    10-20-2012
    Location
    Houston, TX USA
    MS-Off Ver
    Excel 2007
    Posts
    47

    Question column width macro in merged cell seems to have problem

    I am using a macro to size column to specific dimension as below.

    Please Login or Register  to view this content.
    The problem is when I execute the code all three columns (column B, C and D) become the same size which is "23" or in other word it gets the last column size in macro which is 23 in above code.

    I believe the cause of this is merged cell, in my table in column B, C and D, I have few merged cell i.e. B5 is a merged cell combining B5+c5+D5 cell.

    Is there a way I can make this macro work? any suggestion?

    Thanks in advance,
    Anand
    Last edited by anand_erin; 10-30-2012 at 08:29 AM.

  2. #2
    Forum Expert
    Join Date
    06-09-2010
    Location
    Australia
    MS-Off Ver
    Excel 2013
    Posts
    1,714

    Re: column width macro in merged cell seems to have problem

    Hi
    can I suggest you wrap your code in code tags, or a moderator might intervene in rhe thread

    Try this code:

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    10-20-2012
    Location
    Houston, TX USA
    MS-Off Ver
    Excel 2007
    Posts
    47

    Re: column width macro in merged cell seems to have problem

    Thank you Nicky. it works perfectly.

    -Anand

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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