ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Automatic column width adjustment (https://www.excelbanter.com/excel-worksheet-functions/33609-automatic-column-width-adjustment.html)

Senator

Automatic column width adjustment
 
I am importing .cvs records into Excel that I will save as an .xls file.
There are about 25 columns of information and each column has data of a
different character length. However, all the column widths are the same,
8.43. This presents a very laborious process of having to manually adjust
all the column widths. Is there a way to have Excel automatically adjust the
column widths to fit the longest string of characters in each of the columns?
Thanks

Anne Troy

Hi, Senator. You can record a macro to do this:
http://www.officearticles.com/excel/...soft_excel.htm
Here's the steps you want to take after you start recording:

Edit--Select all
Format--Column Autofit
Ctrl+Home
(stop recording)

*******************
~Anne Troy

www.OfficeArticles.com
www.MyExpertsOnline.com


"Senator" wrote in message
...
I am importing .cvs records into Excel that I will save as an .xls file.
There are about 25 columns of information and each column has data of a
different character length. However, all the column widths are the same,
"8.43". This presents a very laborious process of having to manually

adjust
all the column widths. Is there a way to have Excel automatically adjust

the
column widths to fit the longest string of characters in each of the

columns?
Thanks




Anne Troy

By the way, you'll want to store that macro in your personal.xls file.
*******************
~Anne Troy

www.OfficeArticles.com
www.MyExpertsOnline.com


"Senator" wrote in message
...
I am importing .cvs records into Excel that I will save as an .xls file.
There are about 25 columns of information and each column has data of a
different character length. However, all the column widths are the same,
"8.43". This presents a very laborious process of having to manually

adjust
all the column widths. Is there a way to have Excel automatically adjust

the
column widths to fit the longest string of characters in each of the

columns?
Thanks





Hi

You best bet is to click on the square box above the row headings and to the
right of the cloumn headings. Thsi will select all the cells on the sheet.
You can then just double-click the line in between to columns (ie the line
between the letter A and the letter B) and the columns will all autofit to
their widest entries.

Andy.

"Senator" wrote in message
...
I am importing .cvs records into Excel that I will save as an .xls file.
There are about 25 columns of information and each column has data of a
different character length. However, all the column widths are the same,
"8.43". This presents a very laborious process of having to manually
adjust
all the column widths. Is there a way to have Excel automatically adjust
the
column widths to fit the longest string of characters in each of the
columns?
Thanks




Anne Troy

Andy meant "and to the left of the column headings". :)
*******************
~Anne Troy

www.OfficeArticles.com
www.MyExpertsOnline.com


<Andy wrote in message ...
Hi

You best bet is to click on the square box above the row headings and to

the
right of the cloumn headings. Thsi will select all the cells on the sheet.
You can then just double-click the line in between to columns (ie the line
between the letter A and the letter B) and the columns will all autofit

to
their widest entries.

Andy.

"Senator" wrote in message
...
I am importing .cvs records into Excel that I will save as an .xls file.
There are about 25 columns of information and each column has data of a
different character length. However, all the column widths are the same,
"8.43". This presents a very laborious process of having to manually
adjust
all the column widths. Is there a way to have Excel automatically adjust
the
column widths to fit the longest string of characters in each of the
columns?
Thanks







All times are GMT +1. The time now is 04:31 AM.

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