ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   automatic column width (https://www.excelbanter.com/excel-programming/373550-automatic-column-width.html)

Monte0682

automatic column width
 
I have one worksheet with all my cells having the proper width and
height... Also I have about 100 worksheets that are identical to the
1st one except the information that goes in cells. What I need is a way
to automaticlly adjust all other worksheets so they are all the same as
the 1st one that has all columns and rows adjusted.... Hope it is
clear.

Thank you very much in advance...


Tom Ogilvy

automatic column width
 
Sub formatsheets()
worksheets("Master").Cells.Copy
for each sh in Worksheets
if lcase(sh.Name) < "master" then
sh.Cells.Pastespecial xlFormats
end if
next
end sub

This does more than copy row heights and column Widths - it copies all
formatting, so if that is OK test it on a copy of your workbook. NO MERGED
cells.

--
Regards,
Tom Ogilvy


"Monte0682" wrote:

I have one worksheet with all my cells having the proper width and
height... Also I have about 100 worksheets that are identical to the
1st one except the information that goes in cells. What I need is a way
to automaticlly adjust all other worksheets so they are all the same as
the 1st one that has all columns and rows adjusted.... Hope it is
clear.

Thank you very much in advance...




All times are GMT +1. The time now is 11:38 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com