Hi,
Im making a time card for our company and need some help with "matching" two date columns together and if there is a match then execute code. I want this as a vba solution, not a formula. How the worksheets works is; When a user clicks on a button, it will populate a new set of dates for the next pay period, and I then (here is where i need the help!) want to have any holiday date automatically enter into a cell (3 columns to the right of the matching pay period date cell) if the date in the pay period matches one of the holiday dates in my list (which is a named range: Holiday_List, the dates are in column 2). The pay period dates I have in 2 named ranges, "Dates_Week1" and "Dates_Week2" (these are both single column ranges).
How would I write this macro to check all cells in named ranges ("Dates_Week1,Dates_Week2") to see if there is a matching/equal date in my named range ("Holiday_List").columns(2), if matching then "matching date cell in named range("Dates_Week1,Dates_Week2").offset(0,3).value = "Yes"?
Let me know if you would need more clarification, and thank you so much for your time!
Im making a time card for our company and need some help with "matching" two date columns together and if there is a match then execute code. I want this as a vba solution, not a formula. How the worksheets works is; When a user clicks on a button, it will populate a new set of dates for the next pay period, and I then (here is where i need the help!) want to have any holiday date automatically enter into a cell (3 columns to the right of the matching pay period date cell) if the date in the pay period matches one of the holiday dates in my list (which is a named range: Holiday_List, the dates are in column 2). The pay period dates I have in 2 named ranges, "Dates_Week1" and "Dates_Week2" (these are both single column ranges).
How would I write this macro to check all cells in named ranges ("Dates_Week1,Dates_Week2") to see if there is a matching/equal date in my named range ("Holiday_List").columns(2), if matching then "matching date cell in named range("Dates_Week1,Dates_Week2").offset(0,3).value = "Yes"?
Let me know if you would need more clarification, and thank you so much for your time!