Sub Align_Me()
Application.ScreenUpdating = False
With Range("C2:C" & Cells(Rows.Count, "C").End(xlUp).Row)
.AutoFilter 1, ">" & 0
.SpecialCells(12).Offset(0, -2).HorizontalAlignment = xlRight
.AutoFilter
End With
Application.ScreenUpdating = True
End Sub
Try this:
Code:Sub Align_Me() Application.ScreenUpdating = False With Range("C2:C" & Cells(Rows.Count, "C").End(xlUp).Row) .AutoFilter 1, ">" & 0 .SpecialCells(12).Offset(0, -2).HorizontalAlignment = xlRight .AutoFilter End With Application.ScreenUpdating = True End Sub
[table="width: 500"]
[tr]
[td]Sub AlignAccounts()
Dim R As Long
Application.ScreenUpdating = False
For R = 2 To Cells(Rows.Count, "A").End(xlUp).Row
Cells(R, "A").HorizontalAlignment = xlLeft + (xlLeft - xlRight) * (Cells(R, "C") > 0)
Next
Application.ScreenUpdating = True
End Sub[/td]
[/tr]
[/table]
Do you mean if both B and C are less then zero?
Or B or C are less then zero?
nvm sir thanks you so much i think align left is ok, thanks sir
NVM ??
I guess this means never mine you have it working