Forum Discussion

csoares's avatar
csoares
Brass Contributor
Jul 13, 2021
Solved

Controlling row heights of long text in a cell selection

Good morning,

 

i wanted to increase the distance between lines of a long text that i inserted in a selection of cells grouped with "merge" and with "wrap text".

 

Are there any VBA commands that do what I need?

 

Thank you for your help

 

With Range("A9:I20")
          .Merge
          .WrapText = True
          .VerticalAlignment = xlTop
          .HorizontalAlignment = xlJustify
End With

 

  • csoares 

    Excel doesn't provide control over line spacing, but you could use

     

    .VerticalAlignment = xlVAlignDistributed

     

    or

     

    .VerticalAlignment = xlVAlignJustify

3 Replies