Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Dynamic Find


In A1 I have value "taz" (this will change according to user)

I would now like to find "taz" (or alt value entered by user) within
the sheet

My code isnt quite working:

Cells.Find (Range("A1"))


Thanks for any help


--
T De Villiers
------------------------------------------------------------------------
T De Villiers's Profile: http://www.excelforum.com/member.php...o&userid=26479
View this thread: http://www.excelforum.com/showthread...hreadid=566092

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Dynamic Find

Dim rng as Range
set rng = Cells.Find(What:=Range("A1"), _
After:=Range("A1"), _
LookIn:=xlFormulas, _
LookAt:=xlWhole, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=False)
if rng.Address = "$A$1" then
msgbox "Not found"
else
rng.Select
End if

--
Regards,
Tom Ogilvy


"T De Villiers" wrote:


In A1 I have value "taz" (this will change according to user)

I would now like to find "taz" (or alt value entered by user) within
the sheet

My code isnt quite working:

Cells.Find (Range("A1"))


Thanks for any help


--
T De Villiers
------------------------------------------------------------------------
T De Villiers's Profile: http://www.excelforum.com/member.php...o&userid=26479
View this thread: http://www.excelforum.com/showthread...hreadid=566092


  #3   Report Post  
Posted to microsoft.public.excel.programming
Les Les is offline
external usenet poster
 
Posts: 240
Default Dynamic Find

To find a single entry try something like:

Dim x As Range

Set x = Cells.Find(Range("A1"))
If x.Address = "$A$1" Then
MsgBox "Not found"
Else
MsgBox "Found at " & x.Address
End If

--
Les Torchia-Wells


"T De Villiers" wrote:


In A1 I have value "taz" (this will change according to user)

I would now like to find "taz" (or alt value entered by user) within
the sheet

My code isnt quite working:

Cells.Find (Range("A1"))


Thanks for any help


--
T De Villiers
------------------------------------------------------------------------
T De Villiers's Profile: http://www.excelforum.com/member.php...o&userid=26479
View this thread: http://www.excelforum.com/showthread...hreadid=566092


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Dynamic Find

It think if you don't specify the after argument as cell A1, your macro would
give spotty results. Just a thought.

--
Regards,
Tom Ogilvy


"Les" wrote:

To find a single entry try something like:

Dim x As Range

Set x = Cells.Find(Range("A1"))
If x.Address = "$A$1" Then
MsgBox "Not found"
Else
MsgBox "Found at " & x.Address
End If

--
Les Torchia-Wells


"T De Villiers" wrote:


In A1 I have value "taz" (this will change according to user)

I would now like to find "taz" (or alt value entered by user) within
the sheet

My code isnt quite working:

Cells.Find (Range("A1"))


Thanks for any help


--
T De Villiers
------------------------------------------------------------------------
T De Villiers's Profile: http://www.excelforum.com/member.php...o&userid=26479
View this thread: http://www.excelforum.com/showthread...hreadid=566092


  #5   Report Post  
Posted to microsoft.public.excel.programming
Les Les is offline
external usenet poster
 
Posts: 240
Default Dynamic Find

Of course, you are absoluely correct. I should take more care in my postings.
'Tis just my second day at this and I'm learning protocol as I go.
--
Les Torchia-Wells


"Tom Ogilvy" wrote:

It think if you don't specify the after argument as cell A1, your macro would
give spotty results. Just a thought.

--
Regards,
Tom Ogilvy


"Les" wrote:

To find a single entry try something like:

Dim x As Range

Set x = Cells.Find(Range("A1"))
If x.Address = "$A$1" Then
MsgBox "Not found"
Else
MsgBox "Found at " & x.Address
End If

--
Les Torchia-Wells


"T De Villiers" wrote:


In A1 I have value "taz" (this will change according to user)

I would now like to find "taz" (or alt value entered by user) within
the sheet

My code isnt quite working:

Cells.Find (Range("A1"))


Thanks for any help


--
T De Villiers
------------------------------------------------------------------------
T De Villiers's Profile: http://www.excelforum.com/member.php...o&userid=26479
View this thread: http://www.excelforum.com/showthread...hreadid=566092


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
Help with copying dynamic column selected based on remote cell value and dynamic formula fill ers Charts and Charting in Excel 0 March 1st 06 01:05 AM
trying to find the smallest with dynamic column changes Andy Excel Discussion (Misc queries) 1 February 24th 06 09:07 PM
Dynamic Range with unused formula messing up x axis on dynamic graph [email protected] Charts and Charting in Excel 2 February 2nd 06 08:02 PM
Dynamic Find and Replace String Within Functions Based on Column Values [email protected] Excel Programming 0 October 13th 05 06:16 PM
Dynamic Selection Find Function Junior728 Excel Programming 3 August 16th 05 04:38 AM


All times are GMT +1. The time now is 08:30 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"