Display a Value Based on Time Values and Empty Cells

indierock413

New Member
Joined
Aug 31, 2014
Messages
2
EMPLOYEESTAFF #AREAJOB IDTIME INTIME OUT
ADAM10874B5263
TYLER10865A958815:47
PAUL10899D847315:5018:59
JOHN10847A948115:4118:42
BRIAN10838C773415:5318:41
RYAN10833D983415:37
KYLE10820B455114:5418:54
SHAWN10811C5267
TERRY10802A590612:2015:50

<tbody>
</tbody>

I'm looking to return the Staff # of whichever employee is in Area D and who is currently clocked in ("TIME IN" is populated but "TIME OUT" is empty).

I've been trying to use a VLOOKUP function, but can't seem to figure it out. Am I in the right ballpark, or is there a more efficient function to use?
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
So if all the criteria you mentioned is met, where should the output go? Also do you need all of the staff numbers that match the criteria or just one of them. Do you want a formula or vba
 
Upvote 0
https://www.dropbox.com/s/vmkq3zm17b4jq6h/Staffing%20Screenshot.png?dl=0

Here is the abridged version of the data table (top) and display table (bottom), with the display table filled in according to how I'm looking to do so. 'TIME IN' and 'TIME OUT' will be manually time-stamped accordingly in the data table as the employees punch in and out.

In the display table, the 'AREA' column (A16-A19) will be constant, while 'EMPLOYEE' (B16-B19), 'EMP. ID' (C16-C19), and 'JOB ID' (D16-D19) will all be set up with formulas (not VBA) to return the appropriate values based on which employee is currently in each area ('TIME IN' value but no 'TIME OUT' value in the data table).

No need to reply with all 9 formulas, as each column's formulas will be the same basic formula but with slightly different criteria. I'm mostly looking for a formula that will display a value (i.e. 'EMPLOYEE') based on the corresponding (1) 'TIME IN' cell being populated, and (2) the 'TIME OUT' cell being an empty cell. The formulas should only return the employee that is currently punched in and working in the designated area, and does not need to include any employees who worked in the same area but have already punched out.

Hopefully this answers your questions.
 
Upvote 0

Forum statistics

Threads
1,214,885
Messages
6,122,090
Members
449,065
Latest member
Danger_SF

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top