I am building a workbook for my wife which will be used for tracking the time she spends on her projects, amongst other things. The data is organised by years (i.e. each sheet is e.g. '2018', '2017' etc), and then in each sheet, cells B4:B369 contain the dates from 1/1/20XX - 31/12/20XX, with corresponding information relating to each date in the associated columns D-Q.
Columns D-K are fields for inputting times (start/stop windows if you like, to record hours spent on a project in a given day), while the other columns track other variables.
On a master input sheet ('Rates & Classifications') I have a global Project Start Date in cell B2.
I would like to have an error message appear if any of the associated cells (column D-Q) are completed with any information when their corresponding date (in column B) precedes the Project Start Date.
I had tried to do this using Data Validation but there are two issues with this:
1. I wish to restrict the inputs in columns D-Q in ways other than using a validation criteria - custom formula (eg. columns J-Q are drop-down menus, picking up dynamic lists from the 'Rates & Classifications' sheet)
2. While I found a formula that could throw back an error if any of the columns D-Q contained data when the corresponding date cell (in column B) precedes the Project Start Date (namely, IF(AND(NOT(SUMPRODUCT(--(D4:Q4<>""))=0),B4<'Rates & Classifications'!$B$2),"Error","")), I have read online that Data Validation Error messages are designed to work based on a user's input, not based on the output of a formula used with the custom validation criteria selection.
From some quick 'google-research' I have however seen suggestions that this could be achieved quite easily with VBA?!
Any suggestions therefore for a simple VBA script (and how to implement it for someone with zero VBA knowledge) would be very gratefully appreciated!
Many thanks in advance
Columns D-K are fields for inputting times (start/stop windows if you like, to record hours spent on a project in a given day), while the other columns track other variables.
On a master input sheet ('Rates & Classifications') I have a global Project Start Date in cell B2.
I would like to have an error message appear if any of the associated cells (column D-Q) are completed with any information when their corresponding date (in column B) precedes the Project Start Date.
I had tried to do this using Data Validation but there are two issues with this:
1. I wish to restrict the inputs in columns D-Q in ways other than using a validation criteria - custom formula (eg. columns J-Q are drop-down menus, picking up dynamic lists from the 'Rates & Classifications' sheet)
2. While I found a formula that could throw back an error if any of the columns D-Q contained data when the corresponding date cell (in column B) precedes the Project Start Date (namely, IF(AND(NOT(SUMPRODUCT(--(D4:Q4<>""))=0),B4<'Rates & Classifications'!$B$2),"Error","")), I have read online that Data Validation Error messages are designed to work based on a user's input, not based on the output of a formula used with the custom validation criteria selection.
From some quick 'google-research' I have however seen suggestions that this could be achieved quite easily with VBA?!
Any suggestions therefore for a simple VBA script (and how to implement it for someone with zero VBA knowledge) would be very gratefully appreciated!
Many thanks in advance