My company's employee hour tracking program outputs absence information in a specific format which I then need to translate into another format for manual input into a second program. I am well underway in automating this translation, but I am having trouble discriminating between multiple absence codes for a single individual on a single day; I am required to only log the absence code correlating to the greatest number of hours in that day, rounded to the nearest whole number, but no less than 1. For example, if an employee uses 3 hours of sick time (absence code S) and 5 hours of vacation (absence code V) on the same day, there would be 'program 1' output entries for each but I would only record the code as "5V" into 'program 2'. My thought was to use VLOOKUP or INDEX MATCH to determine if more than one row with matching employee number and date entries exist and then compare the hour values, ignoring the lesser and translating the greater, but, try as I might, I cannot find a combination of functions that doesn't just compare a row with itself.
Employee schedules vary from 8 to 10 hours per day and when their absence is for the whole day, only the letter code gets entered (V for a whole day of vacation).
Capture.PNG
Bookmarks