Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I found this piece of code while searching for a way to underline
anytime there is a date change in column A, but it doesnt always underline correctly and if ran twice it incorrectly underlines rows. Where is the bug? I can't find it. Any help is appreciated. thanks! Dim RowNdx As Long Dim ColNum As Integer ColNum = Selection(1).Column Columns("A:A").Select Application.ScreenUpdating = False For RowNdx = Selection(Selection.Cells.Count).Row To _ Selection(1).Row + 1 Step -1 If Cells(RowNdx, ColNum).Value < Cells(RowNdx - 1, ColNum).Value Then Cells(RowNdx - 1, 1).EntireRow.Select With Selection.Borders(xlEdgeBottom) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With End If Next RowNdx |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to do multiple IF checks with dates AND text | Excel Worksheet Functions | |||
Formula help for counting,with a column of dates and a column of n | Excel Worksheet Functions | |||
Value between 2 dates | Excel Worksheet Functions | |||
Return Count for LAST NonBlank Cell in each Row | Excel Worksheet Functions | |||
Comparing Cells and Displaying Data | Excel Worksheet Functions |