View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Steff_DK[_7_] Steff_DK[_7_] is offline
external usenet poster
 
Posts: 1
Default Cells.find restricted to a single range??

I have the below code to search for a number in my sheet.

However, I only want to search the range "rngtest", and if the numbe
does not exist in that range, it should return only a msgbox saying n
such entry.

What should be changed???


Dim iSpecific As integer
Cells.Find(What:=iSpecific, After:=Range("A1"), LookIn:=xlFormulas
LookAt _
:=xlWhole, SearchOrder:=xlByColumns, SearchDirection:=xlNext
MatchCase _
:=False, SearchFormat:=False).Activate

Cheers

Stef

--
Message posted from http://www.ExcelForum.com