Thanks Joel for your fast response.
The code you wrote contains two "Next ColCount". Maybe one of them (the last
one) is actually "Next RowCount"?
Eli
"joel" wrote:
I put the new input data into an array. The array index starts with
index 0 where I'm comparing th efirst member of the array with column A,
2nd item with column B.
Dim NewData(0 to 9)
'add new data here to array
LastRow = Range("A" & rows.count).end(xlup).row
Found = False 'used to determine if new data match an item in the
table
For rowCount = 1 to LastRow
Match = True 'used to determine if any data in the table doesn't
for Colcount = 1 to 10
if NewData(ColCount - 1) < .cells(RowCount,ColCount) then
Match = False 'data in table doesn't match
Exit For
End if
Next ColCount
'test if the entire row matches new data
if Match = True then
Found = True 'row matches new data, stop testing
Exit For
end if
next Colcount
end if
If Match = True then
msgbox("Data matches a row in the Table")
else
msgbox("Data doesn't match a row in the Table")
end if
--
joel
------------------------------------------------------------------------
joel's Profile: 229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=166527
Microsoft Office Help
.