Hi folks, I have a shared workbook that breaks if you sort and filter in certain ways because of blank cells. I would like it serialized when I use it, this code works but seems slower than I would expect. Is there a technique someone would teach me that might decrease the time this takes this to complete?
'col 3 has the unique identifier I would like to tie to an ordered serial number
Dim serial As Long
Dim row As Long
serial = 0
row = 3
While Sheets("data").Cells(row, 3) <> ""
If Sheets("data").Cells(row, 3) <> Sheets("data").Cells(row - 1, 3) Then
serial = serial + 1
End If
Sheets("data").Cells(row, 4) = serial
row = row + 1
Wend
'col 3 has the unique identifier I would like to tie to an ordered serial number
Dim serial As Long
Dim row As Long
serial = 0
row = 3
While Sheets("data").Cells(row, 3) <> ""
If Sheets("data").Cells(row, 3) <> Sheets("data").Cells(row - 1, 3) Then
serial = serial + 1
End If
Sheets("data").Cells(row, 4) = serial
row = row + 1
Wend