Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Cells can be any Range object like Rows(1),
columns("D"),Range("A1:D4"),Rows("1:10") set c = Cells.find(what:="abc"),lookin:=xlvalues,lookat:=x lwhole) if c is nothing then msgbox("data is not found") else msbox("data is found at : " & c.address) end if " wrote: Hi folks. Does anyone know how to search a sheet for a particular reference (could be anything)... and if that reference does not exist, then... 'do something else'. When you do a 'find' manually, and the thing you're looking for doesn't exist... excel let's you know. But when you try and do this in VB... if the reference isn't found, Excel just continues running the code. Hope that makes sense. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
having a problem with IF and SEARCH | Excel Discussion (Misc queries) | |||
Xl search problem | Excel Discussion (Misc queries) | |||
Problem with a search | Excel Programming | |||
Problem with search | Excel Worksheet Functions | |||
Search Problem | Excel Programming |