Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
"cell" should be "cells"
Sub FindSomething() dim rng as Range dim res as String res = InputBox("Enter string to find") if res < "" then set rng = cells.Find(What:=res, _ After:=Range("IV65536"), _ LookIn:=xlFormulas, _ LookAt:=xlPart, _ SearchOrder:=xlByRows, _ SearchDirection:=xlNext, _ MatchCase:=False) if not rng is nothing then rng.Activate end if End if End Sub Change xlPart to xlWhole if you want to match the entire value of the cell. Change xlFormulas to xlValue if you want to find something produced by a formula. -- Regards, Tom Ogilvy "Tom Ogilvy" wrote in message ... Sub FindSomething() dim rng as Range dim res as String res = InputBox("Enter string to find") if res < "" then set rng = cell.Find(What:=res, _ After:=Range("IV65536"), _ LookIn:=xlFormulas, _ LookAt:=xlPart, _ SearchOrder:=xlByRows, _ SearchDirection:=xlNext, _ MatchCase:=False) if not rng is nothing then rng.Activate end if End if End Sub Change xlPart to xlWhole if you want to match the entire value of the cell. Change xlFormulas to xlValue if you want to find something produced by a formula. -- Regards, Tom Ogilvy "gmunro" wrote in message oups.com... I am having a similar problem based on finding the value of an inputbox, where in the above example ine input box entry might be "X3Z" Any help greatly appreciated |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
selecting a variable row range | Excel Programming | |||
Selecting a variable range | Excel Programming | |||
Selecting Variable Rows | Excel Programming | |||
Selecting rows with variable | Excel Programming | |||
Selecting a Range Using a Variable | Excel Programming |