Hello - I have a workbook where several fields need to be required. I have figured some of them out but Im running into issue figuring out how to make the fields that are dependent on the answer in another field to be required.
If B10 = Retail or Both, I need B11 to be a required field
If B18 = Yes, B19:B22 should be required
If B24 = Yes, B25:B28 should be required
If B30 = Yes, B31:B34 should be required
If B36 = Yes, B37:B40 should be required
If B42 = Yes, B43:B46 should be required
If B48 = Yes, B49:B52 should be required
If B48 = Yes, B49:B52 should be required
This goes down to the end where if Add Another Drug = Yes, the next 4 fields should be required.
If B10 = Retail or Both, I need B11 to be a required field
If B18 = Yes, B19:B22 should be required
If B24 = Yes, B25:B28 should be required
If B30 = Yes, B31:B34 should be required
If B36 = Yes, B37:B40 should be required
If B42 = Yes, B43:B46 should be required
If B48 = Yes, B49:B52 should be required
If B48 = Yes, B49:B52 should be required
This goes down to the end where if Add Another Drug = Yes, the next 4 fields should be required.
Cell Formulas | ||
---|---|---|
Range | Formula | |
A19,A25,A31,A37,A43,A49,A55,A61,A67,A73 | A19 | =IF(B18="Yes", "Drug Name","") |
A20,A26,A32,A38,A44,A50,A56,A62,A68,A74 | A20 | =IF(B18="Yes", "Dosing","") |
A21,A27,A33,A39,A45,A51,A57,A63,A69,A75 | A21 | =IF(B18="Yes", "Quantity","") |
A22,A28,A34,A40,A46,A52,A58,A64,A70,A76 | A22 | =IF(B18="Yes", "Frequency","") |
A23,A29,A35,A41,A47,A53,A59,A65,A71,A77 | A23 | =IF(B18="Yes", "Free Form Box","") |
A24,A30,A36,A42,A48,A54,A60,A66,A72 | A24 | =IF(B18="Yes","Add Another Drug?","") |
Cells with Conditional Formatting | ||||
---|---|---|---|---|
Cell | Condition | Cell Format | Stop If True | |
B76 | Expression | =IF($B$16="",TRUE,FALSE) | text | NO |
B75 | Expression | =IF($B$15="",TRUE,FALSE) | text | NO |
B70 | Expression | =IF($B$16="",TRUE,FALSE) | text | NO |
B69 | Expression | =IF($B$15="",TRUE,FALSE) | text | NO |
B64 | Expression | =IF($B$16="",TRUE,FALSE) | text | NO |
B63 | Expression | =IF($B$15="",TRUE,FALSE) | text | NO |
B58 | Expression | =IF($B$16="",TRUE,FALSE) | text | NO |
B57 | Expression | =IF($B$15="",TRUE,FALSE) | text | NO |
B52 | Expression | =IF($B$16="",TRUE,FALSE) | text | NO |
B51 | Expression | =IF($B$15="",TRUE,FALSE) | text | NO |
B46 | Expression | =IF($B$16="",TRUE,FALSE) | text | NO |
B45 | Expression | =IF($B$15="",TRUE,FALSE) | text | NO |
B40 | Expression | =IF($B$16="",TRUE,FALSE) | text | NO |
B39 | Expression | =IF($B$15="",TRUE,FALSE) | text | NO |
B34 | Expression | =IF($B$16="",TRUE,FALSE) | text | NO |
B33 | Expression | =IF($B$15="",TRUE,FALSE) | text | NO |
B28 | Expression | =IF($B$16="",TRUE,FALSE) | text | NO |
B27 | Expression | =IF($B$15="",TRUE,FALSE) | text | NO |
B22 | Expression | =IF($B$16="",TRUE,FALSE) | text | NO |
B21 | Expression | =IF($B$15="",TRUE,FALSE) | text | NO |
A46 | Expression | =IF(AND(B42="Yes",B46=""),TRUE,FALSE) | text | NO |
A45 | Expression | =IF(AND(B42="Yes",B45=""),TRUE,FALSE) | text | NO |
A44 | Expression | =IF(AND(B42="Yes",B44=""),TRUE,FALSE) | text | NO |
A43 | Expression | =IF(AND(B42="Yes",B43=""),TRUE,FALSE) | text | NO |
A76 | Expression | =IF(AND(B72="Yes",B76=""),TRUE,FALSE) | text | NO |
A75 | Expression | =IF(AND(B72="Yes",B75=""),TRUE,FALSE) | text | NO |
A74:B74 | Expression | =IF(AND(B72="Yes",B74=""),TRUE,FALSE) | text | NO |
A73:B73 | Expression | =IF(AND(B72="Yes",B73=""),TRUE,FALSE) | text | NO |
A70 | Expression | =IF(AND(B66="Yes",B70=""),TRUE,FALSE) | text | NO |
A69 | Expression | =IF(AND(B66="Yes",B69=""),TRUE,FALSE) | text | NO |
A68:B68 | Expression | =IF(AND(B66="Yes",B68=""),TRUE,FALSE) | text | NO |
A67:B67 | Expression | =IF(AND(B66="Yes",B67=""),TRUE,FALSE) | text | NO |
A64 | Expression | =IF(AND(B60="Yes",B64=""),TRUE,FALSE) | text | NO |
A63 | Expression | =IF(AND(B60="Yes",B63=""),TRUE,FALSE) | text | NO |
A62:B62 | Expression | =IF(AND(B60="Yes",B62=""),TRUE,FALSE) | text | NO |
A61:B61 | Expression | =IF(AND(B60="Yes",B61=""),TRUE,FALSE) | text | NO |
A58 | Expression | =IF(AND(B54="Yes",B58=""),TRUE,FALSE) | text | NO |
A57 | Expression | =IF(AND(B54="Yes",B57=""),TRUE,FALSE) | text | NO |
A56:B56 | Expression | =IF(AND(B54="Yes",B56=""),TRUE,FALSE) | text | NO |
A55:B55 | Expression | =IF(AND(B54="Yes",B55=""),TRUE,FALSE) | text | NO |
A52 | Expression | =IF(AND(B48="Yes",B52=""),TRUE,FALSE) | text | NO |
A51 | Expression | =IF(AND(B48="Yes",B51=""),TRUE,FALSE) | text | NO |
A50:B50 | Expression | =IF(AND(B48="Yes",B50=""),TRUE,FALSE) | text | NO |
A49:B49 | Expression | =IF(AND(B48="Yes",B49=""),TRUE,FALSE) | text | NO |
B44 | Expression | =IF(AND(C42="Yes",C44=""),TRUE,FALSE) | text | NO |
B43 | Expression | =IF(AND(C42="Yes",C43=""),TRUE,FALSE) | text | NO |
A40 | Expression | =IF(AND(B36="Yes",B40=""),TRUE,FALSE) | text | NO |
A39 | Expression | =IF(AND(B36="Yes",B39=""),TRUE,FALSE) | text | NO |
A38:B38 | Expression | =IF(AND(B36="Yes",B38=""),TRUE,FALSE) | text | NO |
A37:B37 | Expression | =IF(AND(B36="Yes",B37=""),TRUE,FALSE) | text | NO |
A34 | Expression | =IF(AND(B30="Yes",B34=""),TRUE,FALSE) | text | NO |
A33 | Expression | =IF(AND(B30="Yes",B33=""),TRUE,FALSE) | text | NO |
A32:B32 | Expression | =IF(AND(B30="Yes",B32=""),TRUE,FALSE) | text | NO |
A31:B31 | Expression | =IF(AND(B30="Yes",B31=""),TRUE,FALSE) | text | NO |
A28 | Expression | =IF(AND(B24="Yes",B28=""),TRUE,FALSE) | text | NO |
A27 | Expression | =IF(AND(B24="Yes",B27=""),TRUE,FALSE) | text | NO |
A26:B26 | Expression | =IF(AND(B24="Yes",B26=""),TRUE,FALSE) | text | NO |
A25:B25 | Expression | =IF(AND(B24="Yes",B25=""),TRUE,FALSE) | text | NO |
A22 | Expression | =IF(AND(B18="Yes",B22=""),TRUE,FALSE) | text | NO |
A21 | Expression | =IF(AND(B18="Yes",B21=""),TRUE,FALSE) | text | NO |
A20:B20 | Expression | =IF(AND(B18="Yes",B20=""),TRUE,FALSE) | text | NO |
A19:B19 | Expression | =IF(AND(B18="Yes",B19=""),TRUE,FALSE) | text | NO |
A16:B16 | Expression | =IF($B$16="",TRUE,FALSE) | text | NO |
A15:B15 | Expression | =IF($B$15="",TRUE,FALSE) | text | NO |
A14:B14 | Expression | =IF($B$14="",TRUE,FALSE) | text | NO |
A10:B10 | Expression | =IF($B$10="",TRUE,FALSE) | text | NO |
A11:B11 | Expression | =IF(OR(B10="Retail",B10="Both")*AND(B11=""),TRUE,FALSE) | text | NO |
A5:B5 | Expression | =IF($B$5="",TRUE,FALSE) | text | NO |
A4:B4 | Expression | =IF($B$4="",TRUE,FALSE) | text | NO |
A3:B3 | Expression | =IF($B$3="",TRUE,FALSE) | text | NO |
A2:B2 | Expression | =IF($B$2="",TRUE,FALSE) | text | NO |
A13:B13 | Expression | =IF($B$13="",TRUE,FALSE) | text | NO |
A9:B9 | Expression | =IF($B$9="",TRUE,FALSE) | text | NO |
Cells with Data Validation | ||
---|---|---|
Cell | Allow | Criteria |
B18 | List | =Sheet2!$C$1:$C$2 |
B24 | List | =Sheet2!$C$1:$C$2 |
B30 | List | =Sheet2!$C$1:$C$2 |
B36 | List | =Sheet2!$C$1:$C$2 |
B42 | List | =Sheet2!$C$1:$C$2 |
B48 | List | =Sheet2!$C$1:$C$2 |
B54 | List | =Sheet2!$C$1:$C$2 |
B60 | List | =Sheet2!$C$1:$C$2 |
B66 | List | =Sheet2!$C$1:$C$2 |
B72 | List | =Sheet2!$C$1:$C$2 |
B3 | List | =Sheet2!$A$2:$A$21 |
B4 | Text length | =5 |
B5 | List | =Sheet2!$B$1:$B$2 |
B6 | List | =Sheet2!$C$1:$C$2 |
B7 | List | =Sheet2!$D$1:$D$4 |
B8 | List | =Sheet2!$D$5:$D$8 |
B10 | List | =Sheet2!$D$16:$D$18 |
B15 | List | =Sheet2!$D$9:$D$12 |
B16 | List | =Sheet2!$D$13:$D$15 |
B21 | List | =Sheet2!$D$9:$D$12 |
B22 | List | =Sheet2!$D$13:$D$15 |
B27 | List | =Sheet2!$D$9:$D$12 |
B28 | List | =Sheet2!$D$13:$D$15 |
B33 | List | =Sheet2!$D$9:$D$12 |
B34 | List | =Sheet2!$D$13:$D$15 |
B39 | List | =Sheet2!$D$9:$D$12 |
B40 | List | =Sheet2!$D$13:$D$15 |
B45 | List | =Sheet2!$D$9:$D$12 |
B46 | List | =Sheet2!$D$13:$D$15 |
B51 | List | =Sheet2!$D$9:$D$12 |
B52 | List | =Sheet2!$D$13:$D$15 |
B57 | List | =Sheet2!$D$9:$D$12 |
B58 | List | =Sheet2!$D$13:$D$15 |
B63 | List | =Sheet2!$D$9:$D$12 |
B64 | List | =Sheet2!$D$13:$D$15 |
B69 | List | =Sheet2!$D$9:$D$12 |
B70 | List | =Sheet2!$D$13:$D$15 |
B75 | List | =Sheet2!$D$9:$D$12 |
B76 | List | =Sheet2!$D$13:$D$15 |