View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
FSt1 FSt1 is offline
external usenet poster
 
Posts: 3,942
Default Format Fill Down to Last Row

hi
this should work. try it and post back if problems.
sub addformats()
Dim r As Long
lr = cells(Rows.Count, "D").End(xlUp).Row
Range("D1:D" & lr).Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
With Selection.Borders(xlDiagonalUp)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
End Sub

Regards
FSt1

"Keep It Simple Stupid" wrote:

Format: The diagonal line going through the cell (lower left to upper right)
Row: The last row that is populated (remember, this will change everytime I
run the macro)
Column: D

In other words:
Selection.Borders(xlDiagonalDown).Linestyle=xlNone
With selection.borders(xlDiagonalup)
.Linestyle=xlContinuous
.Weight=xlHairline
.ColorIndex=xlAutomatic
...

"FSt1" wrote:

hi,
yes it is possible.
What row?
what format?

regards
FSt1

"Keep It Simple Stupid" wrote:

I know it is possible for formulas, etc, but is it possible to have a macro
that formats a column of cells and only formats down to the last row? It
will always be the same column, but there will be a different number of rows
each time.