Excel Indent function change

J

Joon Kim

Dear experts,

Excel cell function (or feature) called "indent" is set with number of
indents.

When I set it up with 1 indent, I see space (size of 3 spaces) before the
text.

Can I reset the size of it using VBA?
For example, give smaller sized indent (2 space sized indent) before the
text for each cell.
Is that possible?

Please help.
Thanks in advance.

Joon @ MSRT
 
G

Gary''s Student

If the cell contains a number then:

Sub Macro2()
With Selection
.HorizontalAlignment = xlLeft
.NumberFormat = """ ""General"
End With
End Sub


will work. You can set the format for arbitrary number of spaces. This
does not work for text.
 

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

Top