View Single Post
  #7   Report Post  
Alan
 
Posts: n/a
Default

Frank,

Can you help with an embelishment to your solution. How can I trap a NO FIND
following the find command you supplied

"FSt1" wrote:

my name is Frank Stone
FStone
FSt one
how do you spell the number 1

Regards
FSt1

"Alan" wrote:

Dear FSt1,

Thanks very good. I have modified slightly and now all is OK.

What does FSt1 mean or stand for ?

Alan

"FSt1" wrote:

hi,
if you are using the built in find then you do have a problem. try this...
Sub macfindrow()
dim rn as string
dim rng as range
dim therow as long

rn = inputbox("enter something to find")
if rn < "" then
Set rng = nothing
Set rng = range("A1:IV65536").Find(what:=rn, _
After:=Range("A1"), _
Lookin:=xlformulas, _
Lookat:=xlpart, _
SearchOrder:=xlbyrows, _
SearchDirection:=xlNext, _
MatchCase:=false)
end if
therow = rng.row
msgbox "Found at cell " & rng.address
msbbox "The row number is " & therow
end sub

therow is the variable

Regards
FSt1
"Alan" wrote:

Hello,

Any column on that row. Real problem is storing the 'found' row number to a
variable

"FSt1" wrote:

hi,
what column? same column? different column?

Regards
FSt1

"Alan" wrote:

Following a find command I want to store the row number to a variablke and
use that to move to a columb on that row