Autofit Column w/ extra spaces

Marc

Active Member
Joined
Feb 21, 2002
Messages
388
I have data in columns that I sum at the bottom of the sheet via a macro. The macro also performs an autofit upon the column. This leaves my column totals right up against each other. The data values fluctuate in size so I don't want to use a fixed column size. Is there a way to perform the autofit and add a few spaces before the sum so that there is a report that is better on the eyes. Thanks, Marc
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Why don't you use the Autofit method after you've done the sum bit e.g.

Range("A1:A10").Formula = "=INT(rand()*1000000000)"
Range("A11").Formula = "=SUM(A1:A10)"
Cells.Columns.AutoFit

HTH,
D
 
Upvote 0
I already have the autofit method in place, what I need is to add two character spaces to each column so to give more room between the dollar totals. Thanks, Marc
 
Upvote 0

Forum statistics

Threads
1,223,516
Messages
6,172,777
Members
452,477
Latest member
DigDug2024

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
Back
Top