+ Reply to Thread
Results 1 to 4 of 4

Macro to "Jump to" or find data based on a data validation drop down list

  1. #1
    Registered User
    Join Date
    07-25-2016
    Location
    ROSEMEAD,CA
    MS-Off Ver
    365
    Posts
    6

    Macro to "Jump to" or find data based on a data validation drop down list

    Hi all!

    I have been trying to write and record different Macro's to possibly help with a function I am trying to develop within a worksheet.

    So I currently have a worksheet that contains a forecast table by months that displays one project on a standalone basis. Essentially the table itself is a giant sumifs/vlookup that pulls data from elsewhere in the workbook.

    At the top of the forecast tab is a data validated, drop-down list where the user selects which project they would like to view. When the user selects a project a work-order number auto-generates beside it.

    Is it possibly to create a macro that will essentially search for the workorder number (that is a variable parameter) and send the user to where the data is being pulled from?

    The closest I came was this....

    Range("$T$4").Select 'This is the cell the workorder is included in
    Selection.Copy
    Cells.Find(What:="801163847", After:=ActiveCell, LookIn:=xlFormulas, _
    LookAt:=xlPart, SearchOrder:=xlByRows).Activate


    ----Here in-lies the problem, when the macro searches within the .Find function for What=, it displays only a fixed workorder number and not searching for what is in cell $T$4.

  2. #2
    Valued Forum Contributor Neil_'s Avatar
    Join Date
    04-19-2013
    Location
    Yorkshire
    MS-Off Ver
    Office 365 Enterprise E3 2013 / 2016
    Posts
    479

    Re: Macro to "Jump to" or find data based on a data validation drop down list

    Cells.Find(What:=Range("$T$4"), After:=Range("$T$4"), LookIn:=xlFormulas, _
    LookAt:=xlPart, SearchOrder:=xlByRows).Activate

    no need to select or copy
    Frob first, tweak later

  3. #3
    Registered User
    Join Date
    07-25-2016
    Location
    ROSEMEAD,CA
    MS-Off Ver
    365
    Posts
    6

    Re: Macro to "Jump to" or find data based on a data validation drop down list

    Thanks you Neil!!

    Is it possible to for the "found item" to set a print area around the project-specific table and end the macro in page break view? I again tried using relative references, but I am unable to get the macro set a print area for a "found" search item.

    Range("B155:R172").Select
    Range("R155").Activate
    ActiveSheet.PageSetup.PrintArea = "$B$155:$R$172"
    ActiveWindow.View = xlPageBreakPreview

    Also, all tables are aligned within the came columns and repeat after one another. Hopefully that helps!

  4. #4
    Valued Forum Contributor Neil_'s Avatar
    Join Date
    04-19-2013
    Location
    Yorkshire
    MS-Off Ver
    Office 365 Enterprise E3 2013 / 2016
    Posts
    479

    Re: Macro to "Jump to" or find data based on a data validation drop down list

    Not quite sure what you're after. You want to set the print area to the item found? That would be a single cell, is that what you mean?

+ 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. [SOLVED] Data validation "list" - "source" has too many characters
    By bee88 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-21-2015, 04:28 PM
  2. Replies: 1
    Last Post: 07-31-2014, 02:51 AM
  3. DATA VALIDATION ALLOW TEXT "DROP" and "check"
    By Jhon Mustofa in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 02-06-2014, 12:52 AM
  4. List Data Validation + option of "INC"+12 digit number"
    By penfolda in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-29-2013, 02:53 AM
  5. VBA Button "NEXT" next to drop down (data validation) list
    By J00 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-25-2012, 02:06 PM
  6. Replies: 0
    Last Post: 08-30-2012, 04:39 PM
  7. [SOLVED] Make typing "jump" to matching item(s) in drop-down list?
    By Kathy in forum Excel General
    Replies: 4
    Last Post: 11-22-2005, 06:30 PM

Tags for this Thread

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