I needed to select column "D:D" so I did. Then I needed to find in column value of other cell. So what I need to do:
- I got value in "J5" cell.
- I need to find that value in D:D
- I need to move one cell to right
- I need to copy everything from cell (for example - E2)
- Paste it in "J6"
Everything is in one sheet but the result will be used in other sheet. It's for tommorow school project. I was trying all weekend to grab answer, but I can't do it on my own and my brain is washed.
Code:
Columns("B:B").Select
Selection.Find(What:="VA22GU1", After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
Why does everyone want to bring a macro to a formula fight?
Type this in cell J6
Now look up the
OFFSET
andMATCH
functions in the help.To elaborate on @L42 comment
Same result, more compact, just goes to show there is more than one way to skin a cat.
Use this: