View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Die_Another_Day Die_Another_Day is offline
external usenet poster
 
Posts: 644
Default determine if value exists

With Code or a function?
code:
Dim SearchCell As Range
Set SearchCell = Range("J12:J88").Find(What:="DOODLE",LookAt:=xlWho le)
If SearchCell Is Nothing Then
MsgBox "DOODLE Does Not Exist in Range J12:J88"
End If

Function:
If(Iserror(Match("DOODLE",J12:J88,0)),"Not There","Found At: J" &
(Row() - 1 + Match("DOODLE",J12:J88,0))

HTH

Charles Chickering

geebee wrote:
hi,

I am trying write code to determine if a specific value, lets say "DOODLE"
exists within a specified range in an excel sheet. The range specified could
be J12:J88 for example.

Thanks in advance,
geebee