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

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
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,213,546
Messages
6,114,251
Members
448,556
Latest member
peterhess2002

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