LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default 'Search' problem

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
having a problem with IF and SEARCH locke1990 Excel Discussion (Misc queries) 3 December 15th 09 04:26 PM
Xl search problem Sekhar Excel Discussion (Misc queries) 1 December 16th 08 12:47 PM
Problem with a search funkymonkUK[_13_] Excel Programming 1 May 27th 05 01:22 PM
Problem with search anilsolipuram Excel Worksheet Functions 0 November 10th 04 04:37 PM
Search Problem David W[_3_] Excel Programming 1 August 20th 03 04:46 PM


All times are GMT +1. The time now is 10:33 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"