Thread: Unique record
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
joel[_474_] joel[_474_] is offline
external usenet poster
 
Posts: 1
Default Unique record

Yes you are right.

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 Rowcount
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