Google-sheets – How to we make a field (Cell) value mandatory if another field (cell) have specific value, while submitting the data

formulasgoogle sheetsgoogle-sheets-data-validation

I am developing a small attendance app in Google Sheets. Each day after choosing their name or team, the supervisor will see a list of their employees to update their attendance status. The list will be populated according to the latest status of each employee, which will be updated if the supervisor changes their status as "Transferred" or if HR change their status/shift. I want the list to be populated after they change the optional cells at the second row, and then after updated, they need to press the Submit button to save the data. (Only records which are not "No Show" will be saved in a specific range).

My concern is to make the 'Transferred To' field mandatory for the employees whose status is 'Transfer'. I mean that this field cannot be empty when they press Submit. (A message box shows the issue and their status rolls back to 'NO SHOW'. Also if the status field is not Transfer, the 'Transferred to' field should be empty. 'Transferred to' should be a Dropdown list (Data Validation) which I think is an easy thing to do ;-).

I am not sure if it is just a case of adding dependent Data Validations or if there is a better solution for this as well? I would be highly grateful if anybody can guide me on this as I am a newbie in Google Sheets. But I am trying that by myself too.

Here is a link to a simplified format:
Sample Google Sheet

I am also thinking of taking such data by a user form, as I need a new group and a new shift.

enter image description here

This is an image from the actual Google sheet.

Actual Sheet which I am thinking of

Best Answer

  • to color it based on Transfer in B column:

    =REGEXMATCH(B4,"Transfer")

0