seperating repeating data

  • Thread starter Thread starter matmich
  • Start date Start date
M

matmich

I have a list of orders# which have the same number used more than once.
I have already sorted the list, but is there any way a can but some
type of seperator between each set of unique #'s?
Like draw a line or something
 
Hi
try the following macro. It tests column A and inserts a blank row if
the values change
Sub insert_rows()
Dim lastrow As Long
Dim row_index As Long

lastrow = ActiveSheet.Cells(Rows.count, "A").End(xlUp).row
For row_index = lastrow - 1 To 1 Step -1
If Cells(row_index, "A").Value <> Cells(row_index + 1, "A").Value
Then
Cells(row_index + 1, "A").EntireRow.Insert (xlShiftDown)
End If
Next
End Sub
 
Hi matmich
You might be able to use Conditional Formatting for this. Assuming th data starts in A2

1) Select A
2) Format>Conditional_Formattin
3) "Cell Value Is" "not equal to" "=A3
4) Click format button and set a bottom border
5) OK O
6) Copy and Paste_Special>Formats to the other cells

Good Luck
Mark Graesse
(e-mail address removed)
Boston M

----- matmich > wrote: ----

I have a list of orders# which have the same number used more than once
I have already sorted the list, but is there any way a can but som
type of seperator between each set of unique #'s
Like draw a line or somethin
 
Back
Top