Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hey everyone, quick question. Im looking to have some code that wil first try to find a value on a page. If it can't find that value, the it does a set of actions, otherwise, it does a different set of actions At first I thought to use an If, then, else statement, but I don' really know how to incorporate the Find condition. If I could get som help that'd be great. thanks!! -- jpizzl ----------------------------------------------------------------------- jpizzle's Profile: http://www.excelforum.com/member.php...fo&userid=2392 View this thread: http://www.excelforum.com/showthread.php?threadid=38277 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dim rng as Range
Dim sTarget as String sTarget = "ABCDE" set rng =Cells.Find(What:=sTarget, _ After:=ActiveCell, _ LookIn:=xlFormulas, _ LookAt:=xlPart, _ SearchOrder:=xlByRows, _ SearchDirection:=xlNext, _ MatchCase:=False) if not rng is nothing then msgbox "found in cell " & rng.Address Else msgbox "Not found" End Sub -- Regards, Tom Ogilvy "jpizzle" wrote in message ... Hey everyone, quick question. Im looking to have some code that will first try to find a value on a page. If it can't find that value, then it does a set of actions, otherwise, it does a different set of actions. At first I thought to use an If, then, else statement, but I don't really know how to incorporate the Find condition. If I could get some help that'd be great. thanks!!! -- jpizzle ------------------------------------------------------------------------ jpizzle's Profile: http://www.excelforum.com/member.php...o&userid=23920 View this thread: http://www.excelforum.com/showthread...hreadid=382771 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() bump bump -- jpizzle ------------------------------------------------------------------------ jpizzle's Profile: http://www.excelforum.com/member.php...o&userid=23920 View this thread: http://www.excelforum.com/showthread...hreadid=382771 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to find first row where condition is true? | Excel Discussion (Misc queries) | |||
Networkdays function doesn't find true difference between two dat | Excel Worksheet Functions | |||
Return blank cell if 'find' statement not true | Excel Worksheet Functions | |||
how do i find a true value between two different times e.g. 4:15 | Excel Discussion (Misc queries) | |||
VB find (true false) | Excel Worksheet Functions |