On a worksheet dates are to be inserted in cells C7 and C13. In C14 is a calculation to give C13 minus C7 provided both C7 and C13 contain dates and C13 is greater than C7 (i.e a number for date difference).
I already use data validation to control input in C7, C13 and C14. Users can also overwrite the formula in C14 in certain cases (the workbook is read-only so the formula revives when they re-open).
I want to activate different message boxes depending upon the date put in to C13 and upon the figure in C14. In addition rather like the warning feature in Data Validation users can ignore the messages so I only want them to appear when relevant cells are the active cell. In order of priority the messages I want are:
1. If the date in C13 is more than 91 but less than or equal to 181 days after today's date, Message 1 appears.
2. If the date in C13 is more than 181 days after today's date, Message 2 appears.
Messages 1 and 2 are to appear only if the entry has been direcly into C13 (NB I use a data validation dropdown box in C13 but the user can insert another date if required).
3. If the value in C14 is more than 91 but less than or equal to 181, message 3 appears.
4. If the value in C14 is more than 181, message 4 appears.
Messages 3 and 4 are to appear if the value of C14 is created either as a result of inputting dates in C7 or C13 or if the user overtypes C14 with their own figure. I think this means when any of C7, C13 or C14 is the ActiveCell.
The messages should not appear at other times. I have tried using Target.Address = C13 syntax but have got stuck and am on the point of shelling out for a book on VBA for Excel (probably a good investment but that's another story).
Can you also please include the code to change the title in the pop up message boxes to Title 1, Title 2 etc.
I have given cells C7, C13 and C14 names (let us call them Name1, Name2 and Name3 for the sake of example) and so would prefer to use these names rather than the cell references so that I can insert rows above 14 if necessary without having to re-do the code for the messages.
Many thanks in advance.
I already use data validation to control input in C7, C13 and C14. Users can also overwrite the formula in C14 in certain cases (the workbook is read-only so the formula revives when they re-open).
I want to activate different message boxes depending upon the date put in to C13 and upon the figure in C14. In addition rather like the warning feature in Data Validation users can ignore the messages so I only want them to appear when relevant cells are the active cell. In order of priority the messages I want are:
1. If the date in C13 is more than 91 but less than or equal to 181 days after today's date, Message 1 appears.
2. If the date in C13 is more than 181 days after today's date, Message 2 appears.
Messages 1 and 2 are to appear only if the entry has been direcly into C13 (NB I use a data validation dropdown box in C13 but the user can insert another date if required).
3. If the value in C14 is more than 91 but less than or equal to 181, message 3 appears.
4. If the value in C14 is more than 181, message 4 appears.
Messages 3 and 4 are to appear if the value of C14 is created either as a result of inputting dates in C7 or C13 or if the user overtypes C14 with their own figure. I think this means when any of C7, C13 or C14 is the ActiveCell.
The messages should not appear at other times. I have tried using Target.Address = C13 syntax but have got stuck and am on the point of shelling out for a book on VBA for Excel (probably a good investment but that's another story).
Can you also please include the code to change the title in the pop up message boxes to Title 1, Title 2 etc.
I have given cells C7, C13 and C14 names (let us call them Name1, Name2 and Name3 for the sake of example) and so would prefer to use these names rather than the cell references so that I can insert rows above 14 if necessary without having to re-do the code for the messages.
Many thanks in advance.