VBA_Debutant
New Member
- Joined
- Aug 5, 2011
- Messages
- 6
Hi,
I want to use a macro (with Excel VBA 2003) that
1- finds the cell containing a specific value
2- goes to the cell on line 7 of the same column as the found cell
I have tried to find that answer online but could not figure it out.
The start of my macro looks like that:
Dim ValT as String
ValT = Sheets("Sheet1").Range("R3").Value
Dim VarFind As Variant
Set VarFind = Cells.Find(What:=ValT, LookIn:=xlValues, LookAt:=xlWhole)
If VarFind Is Nothing Then
MsgBox ValT & "is not in here"
Exit Sub
Else
Cells.Find(What:=ValT, LookIn:=xlValues, LookAt:=xlWhole).Activate
End If
... and I do not know how to use the column defined by the ActiveCell to go to the Cell on line 7 of ActiveCell's Column. Any suggestions?
Thank you very much for your help!
I want to use a macro (with Excel VBA 2003) that
1- finds the cell containing a specific value
2- goes to the cell on line 7 of the same column as the found cell
I have tried to find that answer online but could not figure it out.
The start of my macro looks like that:
Dim ValT as String
ValT = Sheets("Sheet1").Range("R3").Value
Dim VarFind As Variant
Set VarFind = Cells.Find(What:=ValT, LookIn:=xlValues, LookAt:=xlWhole)
If VarFind Is Nothing Then
MsgBox ValT & "is not in here"
Exit Sub
Else
Cells.Find(What:=ValT, LookIn:=xlValues, LookAt:=xlWhole).Activate
End If
... and I do not know how to use the column defined by the ActiveCell to go to the Cell on line 7 of ActiveCell's Column. Any suggestions?
Thank you very much for your help!