Greetings to all.
I have not done any vba editing in a few years and would like some assistance if possible.
I have attached an example workbook.
I would prefer a vba solution but am open to any other options.
The premise is employees have a gas card. i would like to compare the use of each card to the time card report. In short, was the card used while the employee was on the clock or not.
The attached workbook has two sheets "CC Data" has the card usage and "Time2" has the punch in punch out times. They both have the gas card # referenced.
I would like to go through each gas purchase and mainly find the ones that fall outside of work hours.
There will be issues with purchases that have no corresponding data on the time sheet and vise-versa.
The employees typically work overnights so the punch in and punch out times do have different dates often.
Specifically, For each purchase on sheet "CC Data" (columns AF and AG) check to see if that purchase is within a time range on sheet "Time2" and then put the result in column AH on "CC Data". Either "Within Work Hours" "Outside Work Hours"" or "No Card Match".
I am requesting a vba solution as this will be part of a userform project someone else is working on but if a formula is more elegant or efficient then that would be appreciated as well.
Thanks in advance.