How can I format all Cells in a XLS File to Right Justified?

  • Thread starter Thread starter Jack
  • Start date Start date
J

Jack

Thanks in advance for any help,

Jack

PS - Also am trying to set all columns to the width of 25 too.

Thanks to anyone who can help.
 
With Activesheet.Cells
.HorizontalAlignment = xlJustify
.VerticalAlignment = xlBottom
.ColumnWidth = 25
End With

I'm not sure the HorizontalAlignment was the way you wanted, but you'll get started with this. If you wanted this done to all sheets in a workbook, use this:

dim s as worksheet
for each s in thisworkbook.worksheets
With s.Cells
.HorizontalAlignment = xlJustify
.VerticalAlignment = xlBottom
.ColumnWidth = 25
End With
next s
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top