#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Find method

Try this

Sub Find_First()
Dim FindString As String
Dim Rng As Range
FindString = InputBox("Enter a Search value")
If Trim(FindString) < "" Then
Set Rng = Cells.Find(What:=FindString, _
After:=Range("IV" & Rows.Count), _
LookIn:=xlFormulas, _
LookAt:=xlWhole, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=False)
If Not Rng Is Nothing Then
MsgBox Rng.Column
Else
MsgBox "Can't find the word"
End If
End If
End Sub



--
Regards Ron de Bruin
http://www.rondebruin.nl


"benb" wrote in message ...
I want to search an entire sheet for a cell containing a value then return
the column number for that cell. I have tried variations of
n=Activesheet.Find ([value], LookIn: xlValues, LookAt: xlWhole).Column, but
any adaption I try gets a compile error. Any help?



Reply
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
find method? CG Rosén Excel Programming 2 November 12th 03 10:30 AM
Find method example Shinichi Excel Programming 3 August 22nd 03 10:39 PM
The find method Stuart[_6_] Excel Programming 0 August 5th 03 03:14 PM
Help with the Find method Mike NG Excel Programming 3 August 4th 03 07:15 PM
The Find Method Brad[_7_] Excel Programming 0 July 16th 03 03:23 PM


All times are GMT +1. The time now is 11:13 PM.

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

About Us

"It's about Microsoft Excel"