View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
SangelNet SangelNet is offline
external usenet poster
 
Posts: 31
Default checking for dupes

Hi guys,

in the intent to create a macro that checks for a dupe number with in
several sheets in a workbook(not all),

sheets 280 and 283 thru 288 i want to be able to be in column T and
enter a number if that number is already in column t of any of the
other sheets a msgbox will pop.

this is what i come up with.since im just strating to code its not
working. what is wrong here?

Sub dupcheck()
Dim c As Range
Dim ilast As Long

ilast = cell(Rows.Count, "t").End(xlUp).Row
For Each c In Workbook("sheet283:sheet288;sheet280").range("t4:T "
& ilast)
If Active.cell.Value = c.Range.Value Then
MsgBox ("message here")
End If

thnx