+ Reply to Thread
Results 1 to 8 of 8

How do I populate cells (with numbers) from a dropdown (in text) menu in a timesheet?

  1. #1
    Registered User
    Join Date
    03-09-2013
    Location
    Afghanistan
    MS-Off Ver
    Excel 2007
    Posts
    17

    How do I populate cells (with numbers) from a dropdown (in text) menu in a timesheet?

    Trying to get our old timesheet updated and automated. Timesheet attached. In yellow fill is the dropdown menu with the PTO Codes (paid time off), the red fill area is the project codes and in the green filled cells are where the hours would go. So when i pick a code from the PTO dropdown the project codes (red fill) will populate the correct hours in the green filled cells, example below for WK- (regular work day):

    WK-
    104016.8041.1 Labor 10
    104016.8041.2 Danger Pay 8
    104016.8041.3 Post Differential 8
    104016.8041.4 PTO Post Differential 0
    600000.001 Engility Paid Time Off 0
    600000.002 Engility Holiday 0
    600000.003 Engility Floating Holiday 0
    600000.008 Engility Leave w/o Pay 0

    Now another example would be, lets say i picked TRV-2 (travel day two):

    TRV-2
    104016.8041.1 Labor 10
    104016.8041.2 Danger Pay 0
    104016.8041.3 Post Differential 0
    104016.8041.4 PTO Post Differential 8
    600000.001 Engility Paid Time Off 0
    600000.002 Engility Holiday 0
    600000.003 Engility Floating Holiday 0
    600000.008 Engility Leave w/o Pay 0

    i just need a starting pointthen i can take what you show me and do the rest by copying the code.

    Thanks,

    Eddie Elvis

  2. #2
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: How do I populate cells (with numbers) from a dropdown (in text) menu in a timesheet?

    I would make a table on a separate sheet similar to this :
    Wk- Trv-1 Trv-2
    104016.8041.1 Labor 10 10 10
    104016.8041.2 Danger Pay 8 0 0
    104016.8041.3 Post Differential 8 0 0
    104016.8041.4 PTO Post Differential 0 8 8
    600000.001 Engility Paid Time Off 0 0 0
    600000.002 Engility Holiday 0 0 0
    600000.003 Engility Floating Holiday 0 0 0
    600000.008 Engility Leave w/o Pay 0 0 0
    (add more columns as needed)
    Then for the Values use (assuming this table starts in A1 on Sheet3)this in G5:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    The red 'S''s are just a guestimate as to how many columns you'll need, change if needed
    Drag the formula down

    Note- All those merged cells may cause problems when moving the formula across,or may not

    Hope this helps
    A picture may be worth a thousand words, BUT, a sample Workbook is worth a thousand screenshots!
    -Add a File - click advanced (next to quick post), scroll to manage attachments, click, select add files, click select files, select file, click upload, when file shows up at bottom left, click done (bottom right), click submit
    -To mark thread Solved- go top of thread,click Thread Tools,click Mark as Solved
    If you received helpful response, please remember to hit the * of that post

  3. #3
    Registered User
    Join Date
    03-09-2013
    Location
    Afghanistan
    MS-Off Ver
    Excel 2007
    Posts
    17

    Re: How do I populate cells (with numbers) from a dropdown (in text) menu in a timesheet?

    Working this formula above but no luck, its probably me? Is it possible to for an "Excel" Guru to do the first column on the actual spreadsheet I have attached? Then i can see it in action and I can then apply it to the rest of the drop down selections...

    Thanks Eddie Elvis

  4. #4
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: How do I populate cells (with numbers) from a dropdown (in text) menu in a timesheet?

    The table needs to be created first..you have the names for everything, but there is no place to find the hours for the PTO value...RE-READ my post (#2).. if you supply the table in an uploaded workbook, I (or someone else) CAN give you the solution, but as it is, we have NO way of knowing what the hours are for a particular choice (2 we know; the other 15-18 we do not)

  5. #5
    Registered User
    Join Date
    03-09-2013
    Location
    Afghanistan
    MS-Off Ver
    Excel 2007
    Posts
    17

    Re: How do I populate cells (with numbers) from a dropdown (in text) menu in a timesheet?

    Yes, Sir... I created the table "sheet3", attached... Please advise...

    Respectfully,

    Eddie Elvis

  6. #6
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: How do I populate cells (with numbers) from a dropdown (in text) menu in a timesheet?

    Okay, I adjusted the Ranges, and I'm getting the right values, so I'm not sure what the problem is ? (AND...I did tell you those merged cells will be a pain, You need to copy/paste the formula to new area's now..and get them right, not easy with merged cells...... )
    As it is set up, I only have the values in your green high-lighted cells in Column F(&G&H), otherwise, I would have to break all those merged cells, just to get the formula into 1 of them, Better to use 'Center across selection' than 'Merge and Center'

    Hope this helps

    EDIT-
    An old-time programmer's mantra "Make it WORK first,THEN make it look "pretty"..."
    Attached Files Attached Files
    Last edited by dredwolf; 03-10-2013 at 02:40 AM.

  7. #7
    Registered User
    Join Date
    03-09-2013
    Location
    Afghanistan
    MS-Off Ver
    Excel 2007
    Posts
    17

    Re: How do I populate cells (with numbers) from a dropdown (in text) menu in a timesheet?

    Solved! Thank you Dredwolf... Will run with this...

    Eddie Elvis

  8. #8
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: How do I populate cells (with numbers) from a dropdown (in text) menu in a timesheet?

    You are very welcome !

+ 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