Looking for a way either via data validation or VB code to prevent user entry of a specific codes beyond the given amount. </SPAN></SPAN>
So if cell F42 has a 3 then user should not be able enter more than three vacation carryovers “VC” within the calendar table. The way it is setup. Code “VC” limited to 3 a year as indicated in cell F42. Code “V” for vacation is limited to the number shown in cell F40 and “PH” Personal Holiday is limited to the number shown in cell M40. Is there a way to do this via data validation or VB?</SPAN></SPAN>
</SPAN></SPAN>
Of course a related problem – that I already have each cell’s data validation used for preventing the user to enter H for holiday in cells that fall on weekends using:</SPAN></SPAN>
=NOT(OR(AND(WEEKDAY(DATE($C$3,COLUMN(E:E),$B32),2)>5, LEN(G32)), AND(COUNTIF($S$5:$S$12,DATE($C$3,COLUMN(E:E),$B32)), UPPER(G32)<>"H")))</SPAN></SPAN>
Where the list of holiday dates are provided in range S5:S12.</SPAN></SPAN>
In experimenting with just the VC portion, I entered in data validation and under custom I entered the following formula: </SPAN></SPAN>
=COUNTIF(C5:F35,"VC")>3</SPAN></SPAN>
However, it did not seem to work when tested as true as it still allowed the letters VC to be entered despite that there were 4 other “VC”s entered in the columns C through E:</SPAN></SPAN>
Any help would be appreciated. Using Excel 2003, native functions only as I cannot use Morefunction or other add-ins due to workstation limits.
</SPAN></SPAN>
So if cell F42 has a 3 then user should not be able enter more than three vacation carryovers “VC” within the calendar table. The way it is setup. Code “VC” limited to 3 a year as indicated in cell F42. Code “V” for vacation is limited to the number shown in cell F40 and “PH” Personal Holiday is limited to the number shown in cell M40. Is there a way to do this via data validation or VB?</SPAN></SPAN>
</SPAN></SPAN>
Of course a related problem – that I already have each cell’s data validation used for preventing the user to enter H for holiday in cells that fall on weekends using:</SPAN></SPAN>
=NOT(OR(AND(WEEKDAY(DATE($C$3,COLUMN(E:E),$B32),2)>5, LEN(G32)), AND(COUNTIF($S$5:$S$12,DATE($C$3,COLUMN(E:E),$B32)), UPPER(G32)<>"H")))</SPAN></SPAN>
Where the list of holiday dates are provided in range S5:S12.</SPAN></SPAN>
In experimenting with just the VC portion, I entered in data validation and under custom I entered the following formula: </SPAN></SPAN>
=COUNTIF(C5:F35,"VC")>3</SPAN></SPAN>
However, it did not seem to work when tested as true as it still allowed the letters VC to be entered despite that there were 4 other “VC”s entered in the columns C through E:</SPAN></SPAN>
Any help would be appreciated. Using Excel 2003, native functions only as I cannot use Morefunction or other add-ins due to workstation limits.
</SPAN></SPAN>