+ Reply to Thread
Results 1 to 4 of 4

Match Drop Down List Selection and Import from worksheet

  1. #1
    Registered User
    Join Date
    08-23-2014
    Location
    Miami, USA
    MS-Off Ver
    365
    Posts
    69

    Match Drop Down List Selection and Import from worksheet

    I'm working on a workbook to help me with payroll, and I'm now trying to fill out some cell values based on a NAME picked out from a drop down list of NAMES. What I need, to help make things faster, is to have excel prefill the work hours based on the WEEK NUMBER and NAME of the employee. The worksheet that needs to be filled after picking the name from the drop down list is named "Time Input", and the source of the data I need pulled from is called "Shifts". Here are pictures of the before and after:

    Without Name.jpg After Pick.jpg


    I was thinking of somehow tweaking this code I got from a similar problem I had before, but I need some help trying to figure it out, because now I have two criterias I need to match before copying and pasting into the "Time Input" Worksheet, and I also have alot more Areas. I'm thinking I would need to loop through the different groups in the "Shifts" worksheet and look to match the NAME and WEEK NUMBER. I'm new to VBA and I really don't have much clue on how to do this.

    Please help!!

    Please Login or Register  to view this content.
    Attached Files Attached Files

  2. #2
    Forum Expert skywriter's Avatar
    Join Date
    06-09-2014
    Location
    USA
    MS-Off Ver
    2016
    Posts
    2,760

    Re: Match Drop Down List Selection and Import from worksheet

    Try this.

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Click the * Add Reputation button in the lower left hand corner of this post to say thanks.

    Don't forget to mark this thread SOLVED by going to the "Thread Tools" drop down list above your first post and choosing solved.

  3. #3
    Registered User
    Join Date
    08-23-2014
    Location
    Miami, USA
    MS-Off Ver
    365
    Posts
    69

    Re: Match Drop Down List Selection and Import from worksheet

    Perfect skywriter, it works, I found I minor mistake in this line of code:
    empName = wsTI.Range("C7").Value

    The "C7" should "B7" instead, but other than that it's working perfectly.

    Thank you so much for your help.

  4. #4
    Forum Expert skywriter's Avatar
    Join Date
    06-09-2014
    Location
    USA
    MS-Off Ver
    2016
    Posts
    2,760

    Re: Match Drop Down List Selection and Import from worksheet

    I wouldn't call it a mistake, it's just where I was typing different names for testing, it works perfectly, see the attachment.

    Your drop down is the same color as the label so I thought the whole thing was a label for C7 where you were going to build a drop down.

+ 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] Pre-populated drop-down list from selection made in drop-down list
    By jmaggols in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-15-2015, 12:26 PM
  2. [SOLVED] Drop down list and matching drop down selection to other data
    By connormg in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 07-06-2015, 02:18 AM
  3. Replies: 2
    Last Post: 12-10-2014, 12:42 AM
  4. [SOLVED] Range in one drop down list depended on the selection in another drop down list
    By masben in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-26-2013, 10:36 AM
  5. Autolock Cells from a Drop Down List Selection and a Calendar Selection
    By John Anderson in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-04-2013, 10:54 AM
  6. Populate Drop-down list based on selection from previous drop-down list
    By Diventus in forum Excel - New Users/Basics
    Replies: 14
    Last Post: 01-11-2013, 10:55 AM
  7. Populate Drop-down list based on selection from previous drop-down list
    By poison_stone in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 12-11-2012, 06:10 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