LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 52
Default Activate the cell which was found by vlookup formula

Hi,
I had a similar problem before and I found the code from that time but I still can't figure it out.
I have a date in cell E3 (e.g. "01-05-2021") which also can be found in range H7:H18. That range has all the dates of the 1st day of each month.

I enter the date into cell E3 and then I run a macro. I want the macro to automatically select the particular cell within the range H7:H18, which has the same date as cell E3.

This is the part of the macro I'm struggling with:

Dim c As Range
Dim myStr As String

Range("E3").Select
Selection.Copy

With ActiveSheet
myStr = .Range("E3")
End With

With ActiveSheets
Set c = .Range("H7:H18").Find(myStr)
If Not c Is Nothing Then Application.Goto .Range("H" & c.Row)
End With

(I'm getting this error message: "Object required".)

I'm hoping that someone can help me.
Thanks!
Norbert
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Formula have a VLOOKUP but want it to =0 if no value is found Nicole Excel Worksheet Functions 3 October 26th 09 05:20 AM
How to return the address of a cell found via VLOOKUP? artisdepartis Excel Programming 3 July 6th 07 10:54 AM
How to get the address of the cell found our by vlookup dilettante Excel Programming 3 August 25th 06 01:41 AM
vlookup to return cell position as to where result was found Rock Excel Programming 7 March 13th 05 12:13 AM
vlookup to return the cell positioning where the criteria is found Rock Excel Programming 2 March 12th 05 03:42 PM


All times are GMT +1. The time now is 03:20 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"