Link to home
Start Free TrialLog in
Avatar of shampouya
shampouya

asked on

In VBA why can't I search the entire row belonging to a specific cell?

I am using this code but I am getting an error. Any idea why?

Range("A9").EntireRow.Find(What:="*Market*", After:=ActiveCell, LookIn:=xlFormulas, LookAt:=xlWhole)
Avatar of Saurabh Singh Teotia
Saurabh Singh Teotia
Flag of India image

Try this...

Range("A9").EntireRow.Find(What:="*Market*", After:=cells(1,9) LookIn:=xlFormulas, LookAt:=xlWhole) 

Open in new window


Saurabh...
It's not actually a good idea to search entire rows and columns so maybe

Range("A9").EntireRow.SpecialCells(xlCellTypeConstants).Find(What:="*Market*", After:=ActiveCell, LookIn:=xlFormulas, LookAt:=xlWhole).Select

Open in new window


What error are you getting?
Avatar of Norie
Norie

What error are you getting?

Where's the rest of the code?
ASKER CERTIFIED SOLUTION
Avatar of Martin Liss
Martin Liss
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
The code on its own will cause a compile error, that's why I'm asking where the rest if the code is.
I'm glad I was able to help.

In my profile you'll find links to some articles I've written that may interest you.
Marty - MVP 2009 to 2015
Avatar of shampouya

ASKER

Already checked them out, very helpful articles. Thanks