+ Reply to Thread
Results 1 to 7 of 7

Macro to collapse columns needed

  1. #1
    Registered User
    Join Date
    06-25-2012
    Location
    Newark, New Jersey
    MS-Off Ver
    Excel 2007
    Posts
    42

    Macro to collapse columns needed

    Hi Everyone,

    I need a macro code that can collapse my columns A and B everytime I copy and paste something in the columns.

    Thanks you .
    Last edited by neelpatel; 09-20-2012 at 02:08 PM.

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Macro to collapse columns needed

    You will need to explain some more. Maybe attach a sample file too.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Registered User
    Join Date
    06-25-2012
    Location
    Newark, New Jersey
    MS-Off Ver
    Excel 2007
    Posts
    42

    Re: Macro to collapse columns needed

    I need a macro code to collapse column A and B (please see attached).

    Thank you.
    Attached Files Attached Files

  4. #4
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Macro to collapse columns needed

    What do you mean by collapse? Are you talking about the group - ungroup option?

  5. #5
    Registered User
    Join Date
    06-25-2012
    Location
    Newark, New Jersey
    MS-Off Ver
    Excel 2007
    Posts
    42

    Re: Macro to collapse columns needed

    Just need the columns not be crammed. They should be perfect size so text can be read in both columns. In other words a macro code that would expand the column as the largest text.

  6. #6
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Macro to collapse columns needed

    Try this - right click on your sheet, select view code and copy this code over -
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    06-25-2012
    Location
    Newark, New Jersey
    MS-Off Ver
    Excel 2007
    Posts
    42

    Re: Macro to collapse columns needed

    You're the man. Thanks alot

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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