Alignment

  • Thread starter Thread starter ED
  • Start date Start date
E

ED

Can anyone help?


For c = 1 to 1000
If cell Ec is greater than 0 the wording in cell Cc is aligned right,
other wise wording in cell Cc is aligned left.

Thanks in advance

Ed English
 
One way:

Dim c As Long
For c = 1 To 1000
Cells(c, 3).HorizontalAlignment = _
IIf(Cells(c, 5).Value > 0, xlRight, xlLeft)
Next c
 
Works well.

Thank you,

Ed English


One way:

Dim c As Long
For c = 1 To 1000
Cells(c, 3).HorizontalAlignment = _
IIf(Cells(c, 5).Value > 0, xlRight, xlLeft)
Next c
 

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