+ Reply to Thread
Results 1 to 11 of 11

User Input with Vlookup

  1. #1
    Registered User
    Join Date
    10-28-2011
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    10

    User Input with Vlookup

    Hi there,

    I have produced a spreadsheet so users have a record of the jobs they do in a particular month.
    To simplify.
    Lets say I have a table of 3 columns. In columnA I have the job number i.e. 1,2,3 and in Columns B and C I have the start and finish times for that job, respectively. These times are fixed and I have named this range of cells to be used with the lookup function.

    Now on a seperate worksheet I have a colA of dates for the current month and in colB the user is invited to enter the corresponding job they did on that particular day. The user enters the job number by selecting the job from a data validation list. Depending on what job they select, Col
    C shows the start time and ColD the Finish time, by using the vlookup function to return the corresponding colums from the initial table created.

    Now here's my problem. In this example we have 3 jobs with fixed start/finish times in a lookup table. Now lets say I introduce a fourth job. This has no fixed start/finsih time but is also included in the lookup table. What code can I use in the cells for the start and finish times for job 4 so that when 4 is selected from the data validation list the user is prompted to enter a start and finish time which then appears in ColC and D in our second sheet.

    Many thanks in advance

  2. #2
    Forum Contributor
    Join Date
    08-04-2011
    Location
    Tampa, FL
    MS-Off Ver
    Excel 2007
    Posts
    109

    Re: User Input with Vlookup

    Have you thought about using a data form to add, edit, find, and delete rows in your data?

    http://office.microsoft.com/en-gb/ex...010236698.aspx

    You can also create a macro to auto open the data form when the spreadsheet is opened.

  3. #3
    Registered User
    Join Date
    10-28-2011
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: User Input with Vlookup

    Data Form doesn;'t quite seem what I'm after.
    I have attached a copy of my spreadsheet.
    Iwant to add an additional job to my list of duties say for eample "Spare". The suer then adds the start and finish times whilst preerving the underlying formulas.
    Attached Files Attached Files

  4. #4
    Forum Contributor
    Join Date
    08-04-2011
    Location
    Tampa, FL
    MS-Off Ver
    Excel 2007
    Posts
    109

    Re: User Input with Vlookup

    I've added two new functions to your spreadsheet:

    Please Login or Register  to view this content.
    I have also modified the "if" statements in columns D and E to leverage the functions if the value in column C is not defined or not in the lookup table. If the value doesn't exist it prompts the user to enter the start and end times. To test, enter an arbitrary value in column C.
    Attached Files Attached Files
    Last edited by Dionysos; 12-13-2011 at 12:24 PM.

  5. #5
    Registered User
    Join Date
    10-28-2011
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: User Input with Vlookup

    many thanks Dionysos, but i cannot open the spreadsheet. Any ideas?

  6. #6
    Forum Contributor
    Join Date
    08-04-2011
    Location
    Tampa, FL
    MS-Off Ver
    Excel 2007
    Posts
    109

    Re: User Input with Vlookup

    Try it now.

  7. #7
    Registered User
    Join Date
    10-28-2011
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: User Input with Vlookup

    Quote Originally Posted by Dionysos View Post
    Try it now.
    Keeps saying Excel cannot open file because the file or file extension is not valid. I have excel 2007. Is the file corrupt by any chance. Is there another way I can download the file?

    Your help is much appreciated.

  8. #8
    Forum Contributor
    Join Date
    08-04-2011
    Location
    Tampa, FL
    MS-Off Ver
    Excel 2007
    Posts
    109

    Re: User Input with Vlookup

    I tested your original file and it seems to be corrupt as well. May be the attachment manager. If this one doesn't work then I give up.
    Attached Files Attached Files
    Last edited by Dionysos; 12-14-2011 at 03:35 PM.

  9. #9
    Registered User
    Join Date
    10-28-2011
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: User Input with Vlookup

    iT WORKS!!!
    Thanks for your efforts.

  10. #10
    Registered User
    Join Date
    10-28-2011
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: User Input with Vlookup

    When i enter an arbitrary value in Col C it asks for end time before start time. Can these be switched? i.e. request start time first.

  11. #11
    Forum Contributor
    Join Date
    08-04-2011
    Location
    Tampa, FL
    MS-Off Ver
    Excel 2007
    Posts
    109

    Re: User Input with Vlookup

    Not sure what triggers one function to fire before the other. I tried switching the columns just to see if it was the order of the cells in the spreadsheet, but that didn't have any affect. Anyone else out there know why one function fires before another if they are triggered by the same event and how to change it?

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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