+ Reply to Thread
Results 1 to 4 of 4

Workbook_Open - pick a value from cell reference & find in a Column and go to that cell

  1. #1
    Registered User
    Join Date
    11-18-2004
    Location
    Chennai, India
    MS-Off Ver
    Excel 2016,Office 365
    Posts
    35

    Workbook_Open - pick a value from cell reference & find in a Column and go to that cell

    Hello,

    My Range is Col A and criteria in L1. when workbook open it should take the value from L1 and find in the Range & go to the particular cell address.
    Range & Criteria is DATE

    below code is not giving desired result. if this can be modified or another lines of code will help.

    Private Sub Workbook_open()
    Dim strdate As date
    Dim rCell As Range
    strdate = Range("L1").Value

    Set rCell = Cells.Find(What:=strdate, After:=Range("A1"), LookIn:=xlValues _
    , LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False)

    If rCell Is Nothing Then
    MsgBox ("nothing")
    Else
    rCell.Select
    End If
    End Sub

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Workbook_Open - pick a value from cell reference & find in a Column and go to that cel

    Please upload a workbook or a representative cut down copy, anonymised if necessary. It is always easier to advise if we can see your request in its context.

    Show a before and after situation with manually calculated results, explaining which information is data and which is results, and if it's not blindingly obvious how you have arrived at your results some explanatory notes as well.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Expert Kenneth Hobson's Avatar
    Join Date
    02-05-2007
    Location
    Tecumseh, OK
    MS-Off Ver
    Office 365, Win10Home
    Posts
    2,573

    Re: Workbook_Open - pick a value from cell reference & find in a Column and go to that cel

    Are you sure that the sheet with L1 is the ActiveSheet when the file open?

    Seems ok to me IF above is true...
    Please Login or Register  to view this content.

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Workbook_Open - pick a value from cell reference & find in a Column and go to that cel

    ...and of course if the sheet with the relevant L1 cell is not the Active sheet then make the first line of the Open event

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    where Sheet1 is the sheet with the L1 cell.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 9
    Last Post: 08-24-2017, 09:16 PM
  2. Find last row in column use that cell reference in formula
    By D_N_L in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-29-2013, 11:39 AM
  3. [SOLVED] In VBA how to pick up cell reference of last changed worksheet cell?
    By staff in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-28-2013, 07:36 PM
  4. [SOLVED] Find a Value in Row and Reference a Cell in Same Column as Value
    By TylerJamison in forum Excel General
    Replies: 4
    Last Post: 08-14-2012, 11:44 AM
  5. Replies: 1
    Last Post: 05-26-2010, 09:40 AM
  6. How to pick a reference Cell
    By jcc31 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-04-2007, 05:30 PM
  7. [SOLVED] Column Reference-how do I find a cell containing a certain value and get?
    By Hugh Murfitt in forum Excel General
    Replies: 0
    Last Post: 02-09-2006, 12:00 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1