Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
find command using variables
Help. I'm having trouble using an established variable in a find. want to find a certain value in...say column A. Probably a synta error on my part. I can't seem to find a way to use "MyVar1" as value in a find. Any suggestions -- eyecalibrat ----------------------------------------------------------------------- eyecalibrate's Profile: http://www.excelforum.com/member.php...nfo&userid=662 View this thread: http://www.excelforum.com/showthread.php?threadid=26303 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
find command using variables
Hi Eyecalibrate,
Sub Tester() Dim rng As Range Dim myVar1 As String myVar1 = "ABC" With ActiveSheet.Columns("A:A") Set rng = .Find(myVar1, LookIn:=xlValues) If Not rng Is Nothing Then MsgBox rng.Address Else MsgBox myVar1 & " not found in specified range" End If End With End Sub --- Regards, Norman "eyecalibrate" wrote in message ... Help. I'm having trouble using an established variable in a find. I want to find a certain value in...say column A. Probably a syntax error on my part. I can't seem to find a way to use "MyVar1" as a value in a find. Any suggestions? -- eyecalibrate ------------------------------------------------------------------------ eyecalibrate's Profile: http://www.excelforum.com/member.php...fo&userid=6621 View this thread: http://www.excelforum.com/showthread...hreadid=263032 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
two sets of variables to find result | Excel Discussion (Misc queries) | |||
Range of variables with the 'floor' command included | Excel Worksheet Functions | |||
Excel has a "Find Next" command but no "Find Previous" command. | Excel Discussion (Misc queries) | |||
Input Command with Mainframe file and multiple variables | Excel Programming | |||
Variables in command lines | Excel Programming |