Quantcast
Channel: Excel IT Pro Discussions forum
Viewing all articles
Browse latest Browse all 11829

VBA - If a range of cells do not contain specific text based on date ranges, then error.

$
0
0
Hi,

This is my first post so please be gentle with me, and thank you in advance for any help you can provide.

I am creating a spreadsheet that records the weekend working hours of our staff. However, depending on what work they do during that weekend it can have a huge impact on whether they can work on other areas, on another weekend, if they haven't done so for a certain period of time. I also want to record whether they choose to be paid or take a day in lieu as this is something we're trialling. 

I'll try to explain as best I can.

*The spreadsheet is currently set up with weekend dates in the upper rows (1-3), and staff names in columns A-B, and I have set up some basic data validation so the cells can only be filled from specific options.

Ok, so a scenario...

Lets say Staff1 works on ContractA during Month1, Month2 and Month3 (or just one of those months), they can work on ContractA during Month4 also as they are familiar with it. However, they cannot work on ContractB during Month4 if they haven't worked on it during Month1 as they will now be unfamiliar and will require refresher training (I am setting a three-month limit on spaces between working on each contract), so ideally, an error message will pop up and will not allow that text in that cell based on the three-month boundary, and instead say "Refresher Training Required".

I hope I have explained this well enough for one of the Gurus to help out. Is this possible? Any ideas would be superb.

Viewing all articles
Browse latest Browse all 11829

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>