View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Claus Busch Claus Busch is offline
external usenet poster
 
Posts: 3,872
Default Cell to be activated, which is a result of a vlookup formula

Hi Norbert,

Am Sun, 2 Feb 2020 08:31:29 -0800 (PST) schrieb Norbert:

I have following formula: =VLOOKUP($H6&"-"&I6,'Stock sheet'!$A:$F,6,FALSE)

After the result is displayed, I'd like the cursor to jump to that exact cell, which it found in 'Stock sheet'!$A:$F,6,False).
I tried Goto, but it doesn't work.


try:

Sub Test()
Dim c As Range
Dim myStr As String

With ActiveSheet
myStr = .Range("H6") & "-" & .Range("I6")
End With

With Sheets("Stock sheet")
Set c = .Range("A:A").Find(myStr)
Application.Goto .Range("F" & c.Row)
End With
End Sub


Regards
Claus B.
--
Windows10
Office 2016