Link to home
Start Free TrialLog in
Avatar of ExpExchHelp
ExpExchHelpFlag for United States of America

asked on

Excel formula (validation check)

Experts:

I need some assistance with creating a validation check (formula).

Here's what I have in the Excel file:
- Columns D:F may have a cell values = "True"

Here's what I need to check:
- If cells in either column D or column E have a value of "True", then I must validate whether or not I have a value of "True" in associated cells in either column G or column H.  

For example, if either cell D2 or E2 has a checked checkbox (value of "True"), then I must also have a checked checkbox in either G2 or H2.  If G2 *or* H2 don't have a value = True, I want to display a message indicating "Please select a value in column G or H).

Any ideas how to create such IF statement?


Thank you,
EEH
Avatar of Rob Henson
Rob Henson
Flag of United Kingdom of Great Britain and Northern Ireland image

=IF(AND(OR(D2=TRUE,E2=TRUE),G2="",H2=""),"Please select a value in column G or H","")
Avatar of ExpExchHelp

ASKER

Rob:

Thank you for the prompt response.   I appreciate your assistance.

Ok, the checkbox in E2 is checked (thus value equals "true").   For testing purposes, I have *unchecked* both cells G2 and H2 (thus, their values are now "false").   Based on this scenario, I should see the error message "Please select a value in column G or H".... however, I don't.

Anything obvious missing?

EEH
ASKER CERTIFIED SOLUTION
Avatar of Subodh Tiwari (Neeraj)
Subodh Tiwari (Neeraj)
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Sktneer:  Excellent -- this formula works great!   Thank you.
You're welcome. Glad I could help.