Hi, I am struggling with a formula to return true from a combination of values from two cells, for instance I want the value to be true if say cell A1 = 1 and cell B1 = 2 or 3, any other combinations would be false.
Kind regards Darren
If Formula (2010)
-
- Administrator
- Posts: 78636
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
-
- 3StarLounger
- Posts: 315
- Joined: 04 May 2010, 15:18
Re: If Formula (2010)
Thanks Hans,
That works but I now realise I have not made it entirely clear what I need. The comparing works but I need it to return
values other than true or false, say "XXX" for true and "YYY" for false?
Kind Regards
That works but I now realise I have not made it entirely clear what I need. The comparing works but I need it to return
values other than true or false, say "XXX" for true and "YYY" for false?
Kind Regards
-
- Administrator
- Posts: 78636
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: If Formula (2010)
Then you can use
=IF(AND(A1=1,OR(B1=2,B1=3)),"text if true","text if false")
substituting the appropriate text strings.
=IF(AND(A1=1,OR(B1=2,B1=3)),"text if true","text if false")
substituting the appropriate text strings.
Best wishes,
Hans
Hans
-
- 3StarLounger
- Posts: 315
- Joined: 04 May 2010, 15:18
Re: If Formula (2010)
Thanks Hans, it's been a few years but you're still the top!