Autofit column after formula recalc

rdw72777

Well-known Member
Joined
Apr 5, 2005
Messages
723
I've seen numerous macros that allow the user to resize a range of columns using autofit. Is there a way that, without using code, that a column can be forced to resize when the resulting formula in a cell in that column returns results of varying widths?
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.

rdw72777

Well-known Member
Joined
Apr 5, 2005
Messages
723
Is there a way to have this happen automatically?

I'm building a series of 50 columns and 1000 rows, and every time a a different selection is picked from a drop down (data validation - list), all of these formulas will recalculate. When this happens, I'd like the columns to resize automatically. And trying to avoid VBA.
 

Fazza

MrExcel MVP
Joined
May 17, 2006
Messages
9,368
AFAIK, you'll need VBA.

What about cheating a little - using a smaller font?
 

rdw72777

Well-known Member
Joined
Apr 5, 2005
Messages
723
Well it could be anywhere from 20 characters long to 60+ characters long, so cheating will just make things look awkward.
 

Fazza

MrExcel MVP
Joined
May 17, 2006
Messages
9,368
just in case it helps. with a query table or pivot table column widths can automatically vary without VBA
 

Watch MrExcel Video

Forum statistics

Threads
1,132,739
Messages
5,655,023
Members
418,171
Latest member
ramiroayala

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top