VBA newbie - can i search the spreadsheet based on the active cell?

  • Thread starter Thread starter ciupe
  • Start date Start date
C

ciupe

Hi Guys.

I'm new to VBA... and untill i get a book to help me out, let me giv
you guys a try.

I want to search my sheet with the value in the active cell (or
speciffic cell). Is that possible?

I'm trying to do a simple inventory sheet. I enter the item numbe
(0024 for example), and excel reports the row its in.

I can make it fancier from there but i need excel to return the row th
result is in.

Tell me what functions in vba to look up, or some sample code. I'
sure i can decipher it. Thanx :
 
ItemCode = Activecell.Value
Cells.Find(What:=ItemCode, After:=ActiveCell, LookIn:=xlFormulas,
LookAt:= _
xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext,
MatchCase:=False _
).Activate
ItemRow = Activecell.Row

HTH,
Nikos
 
Back
Top