Forum Discussion
RickW5526
Mar 07, 2022Copper Contributor
IF OR AND Functions
I have set up a drop down menu with four values (revenue, expenses, capital infusion, and return of capital). I also have a column where amounts will be entered. I want to ensure that only positi...
HansVogelaar
Mar 07, 2022MVP
In a cell in row 8, you could use
=IF(OR(AND(OR(B8={"Revenue","Capital Infusion"}),H8>0),AND(OR(B8={"Expenses","Return of Capital"}),H8<0)),"OK","Error")
In a Data Validation rule of type Custom for H8 and below, you could use formula
=OR(AND(OR(B8="Revenue",B8="Capital Infusion"),H8>0),AND(OR(B8="Expenses",B8="Return of Capital"),H8<0))
- RickW5526Mar 07, 2022Copper ContributorThanks - but I am now getting "Error" in all scenarios.
- RickW5526Mar 07, 2022Copper ContributorThanks very much. Excel is indicating there is an error in the formula - which I cannot locate.
- HansVogelaarMar 07, 2022MVP
I forgot a quote. I have corrected my previous reply.
- RickW5526Mar 07, 2022Copper ContributorMy bad - it is working. Thank you very much!!