Batch Resizing Columns

Posted on 2009-12-28
Last Modified: 2013-11-25
How can I resize all of the columns on all of the excel files in the a given directory?
Question by:eracer001
    LVL 29

    Accepted Solution

    Well try this file and let me know her eis how it works
    1) File is 2003 Excel Version and can work 2007
    2) Set your security Macro to Medium before running the file: Tools/Macro/Security choose Medium and close Excel
    3) Run this file and Enable Macro When prompted
    4) Run macro 'ResizeColumnsAllFiles' by doing: Tools/Macro and the Play Sign
    5) Choose the Directory that you want to resize columns
    6) it will find the first file and display it and select the first sheet and ask you for a column size input what you want like 8 15 or whatever digit you want. Then it will do it for oyu if the workbook has an other sheet it will display it and ask you to input the column with the InputBox show you the file name and the sheet it is processing. It will do all workbooks in the mentioned directory.

    If you need more automation like just input once and it doing the whole thing for you let me know it is a minor change.

    Author Closing Comment

    Worked good, but I had to mod the file so it wouldn't ask for every single sheet's column width.

    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
    Improved? Move/Copy Add-in Replacement - How to avoid the annoying, “A formula or sheet you want to move or copy contains the name XXX, which already exists on the destination worksheet.” David Miller (dlmille)  It was one of those days… I wa…
    The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
    This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    26 Experts available now in Live!

    Get 1:1 Help Now