Find Method

  • Thread starter Thread starter Monika
  • Start date Start date
M

Monika

I want to start my search from the beginning of the sheet.
I am trying as:
Set tmp2 = Cells.Find(fVal, LookIn:=xlValues
SearchOrder:=xlByColumns,SearchDirection:=xlNext)
Set tmp2 = Cells.Find(fVal, LookIn:=xlValues,
SearchOrder:=xlByRows,SearchDirection:=xlNext)
where do ineed to change so that my search starts from
beginning

thanks
 
dim tmp2 as range
with worksheets("sheet1").usedrange
set tmp2 = .cells.find(what:=fval,after:=.cells(.cells.count), ....
end with

..cells(.cells.count) is the last cell in the range.

And by finding it after that last cell, you start with the first (usually A1).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top