Thank you for looking at my question.
The object is of the code is:
When the user types in the date in column A of the "WS_ProductConsumable" sheet, the adjacent cell in column B is automatically populated with the Vlookup value from column 4 of the named range "CalendarWeekend_Hols", and if the value equals "Weekend" or "P/Hol", the row (from column A to H) is filled with conditional formatting of red cell fill with white text, as per sample of cell B3 in sheet "wsCalendarWithHolidays", which has been vba coded for that cell.
VBA Code:
![]()
Please Login or Register to view this content.
The cells which are not a Weekend or P/Hol are to be left populated with the data the user entered or 0 if no data in cell (cells from C:H which appear to be blank have been conditionally formatted to white fill with white text, to appear blank for the cells that contain 0s).
The workbook has 2 worksheets with the worksheet codenames:
- WS_ProductConsumables (which is the data entry sheet)
- wsCalendarWithHolidays (which is a customised calendar in which a named range has been created for the columns A:D using offset).
- Name range name: "CalendarWeekend_Hols"
I would really appreciate any help.
Bookmarks