Afternoon, all!
I'm after a little help and guidance from the VBA wizards, please.
I have the following set-up (this is just a simple example, but properly reflects the real layout):
Excel 2016 (Windows) 32 bit
A B C D E F G H I J 1Pupil Subject A No. A Subject Capacity 2 1Ar Ar 1 Ar 10 3 2Gm BS 0 BS 5 4 3MS Ge 5 CP 5 5 4Ge Gm 1 ClasCi 5 6 5Ge Hi 0 DT 5 7 6Ge MS 1 Dr 5 8 7Ge SS 0 FT 5 9 8Ge Fr 5 10 9 GPE 5 11 10 Ge 5 12 Gm 5 13 Hi 5 14 La 5 15 MS 5 16 Mu 5 17 RE 5 18 SS 5 19 Sp 5
Sheet: Sheet1
Column B contains subject choices with drop-down list selection.
F2:G8 are conditionally formatted to turn red when capacity is reached for that subject (see the capacity grid far right).
Once capacity is reached in column B, if someone tries to change any existing entries to that subject OR add another entry of that subject (e.g. in B10), I would like a pop-up message ("Subject full - choose a different option") and for the user to be stopped from entering the subject in question into that column.
In other words, there cannot be more that 5 instances of Ge in the subject column.
However, if someone wishes to change any existing Ge to something else, the drop-down still needs to work, so I don't want the cell locking.
Is this something that is easy to do with VBA?
Bookmarks