+ Reply to Thread
Results 1 to 2 of 2

Autofit Multiple Consecutive & Nonconsecutive Columns

  1. #1
    Forum Contributor
    Join Date
    08-29-2011
    Location
    Atlanta
    MS-Off Ver
    Excel 2007
    Posts
    171

    Autofit Multiple Consecutive & Nonconsecutive Columns

    Hello,

    I am trying to consolidate mulitple lines of code into one line so as to autofit mulitple columns. I'm not sure if it can be done, but my gut says yes.

    I attempted to consolidate by using:

    Columns("B:D", "F:G", "K", "N", "P", "T").EntireColumn.AutoFit

    and I've also tried:

    Columns("B:D", "F:G", "K:K", "N:N", "P:P", "T:T").EntireColumn.AutoFit

    But, these did not work. Can anyone provide a solution to this for me?

    Thanks!

  2. #2
    Forum Contributor
    Join Date
    08-29-2011
    Location
    Atlanta
    MS-Off Ver
    Excel 2007
    Posts
    171

    Re: Autofit Multiple Consecutive & Nonconsecutive Columns

    Range("B:D,F:G,K:K,N:N,P:P,T:T").EntireColumn.AutoFit

+ 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