I am very new to VBA code. Now I was assigned to make a task that validate the data in an excel sheets.
For Example in my Column A, I have a drop down menu that enable the user to make a selection between "Yes" or "No" only.
If user selected "Yes", cells in Column B and Column C will be marked as Mandatory and cannot be blank. I want to put a validation error on this.
**Example 1: If A1 and A30 == YES**
B1 and C1, B30 and C30 are mandatory
Will fill a color to the mandatory cells and remove the fill color when the cells have value already
Throw a validation error when these cells are blank and if exceeds the number of characters required.
Example 2: If A99 == NO
B99 will be locked and the user will not be allowed to enter a data on this cell. Possible that we can add a cell value as "NA" to avoid confusion
I was able to capture this using the data validation and conditional formatting. However, I cannot perform the locked functionality since as per research, I need a VBA code for this one.