P
Peter
Hello
I've got a variable that is set to the cell address of a item of data that
I'm looking for.
Do
Set rngFind = .FindNext(rngFind)
If rngFind.Address <> firstAddress Then
addSelection = addSelection & rngFind.Address & ","
'Debug.Print rngFind.Offset(0, 0).Value & " " &
rngFind.Offset(0, 1).Value & " " & rngFind.Offset(0, 3).Value & " " &
rngFind.Offset(0, 7).Value
cnt = cnt + 1
End If
Loop While Not rngFind Is Nothing And rngFind.Address <>
firstAddress
So if my cnt is greater then 1 I've found duplicate entries. The variable
addSelection then has a value of $B$80,$B$81,
To determine which cell to use, I look at the date, compare them, and go
with the latest. The datesare three columns over, so I've
Part Number Date
$B$80 $E$80
$B$81 $E$81
What the best way to do this?
I can split addSelection by the coma's and cycle over it. Then how would
get the value of cell $E$80 to assign to a compare variable?
I've got a variable that is set to the cell address of a item of data that
I'm looking for.
Do
Set rngFind = .FindNext(rngFind)
If rngFind.Address <> firstAddress Then
addSelection = addSelection & rngFind.Address & ","
'Debug.Print rngFind.Offset(0, 0).Value & " " &
rngFind.Offset(0, 1).Value & " " & rngFind.Offset(0, 3).Value & " " &
rngFind.Offset(0, 7).Value
cnt = cnt + 1
End If
Loop While Not rngFind Is Nothing And rngFind.Address <>
firstAddress
So if my cnt is greater then 1 I've found duplicate entries. The variable
addSelection then has a value of $B$80,$B$81,
To determine which cell to use, I look at the date, compare them, and go
with the latest. The datesare three columns over, so I've
Part Number Date
$B$80 $E$80
$B$81 $E$81
What the best way to do this?
I can split addSelection by the coma's and cycle over it. Then how would
get the value of cell $E$80 to assign to a compare variable?