Excel VBA Course
Excel VBA Course - From Beginner to Expert

200+ Video Lessons
50+ Hours of Video
200+ Excel Guides

Become a master of VBA and Macros in Excel and learn how to automate all of your tasks in Excel with this online course. (No VBA experience required.)

View Course

Multiple IF, AND statement

1

Hi,

Requesting help in excel.  I have 2 cells with dropdown list of "up" and "down". I'm trying to

1)  if cell 1 is "up" and cell 2 is "down", show "X" in cell 3. 

2) if cell 1 is "down" and cell 2 is "up", show "Y" in cell 3.

3) if cell 1 is "up" and cell 2 is "up", "show "z" in cell 3.

4) if cell 1 is "down" and cell 2 is "down", show "z" in cell 3.

Thank you.

Answer
Discuss

Discussion

Edit your post and make your title descriptive!
don (rep: 1989) Sep 2, '16 at 3:54 pm
Add to Discussion

Answers

1
Selected Answer

suppose your data is in cell(a1) & cell(b1)

Use this formula with(Ctrl+shift+enter)   Array formula:

=INDEX({"x";"y";"z";"z"},MATCH($A$1&$B$1,{"Updown";"downUp";"UpUp";"downdown"},0))
Discuss

Discussion

Thank you.
RN34 (rep: 4) Sep 8, '16 at 2:53 pm
Add to Discussion
0
=IF(AND(A1="up",B1="down"),"X",IF(AND(A1="down",B1="up"),"Y",IF(AND(A1="up",B1="up"),"Z",IF(AND(A1="down",B1="down"),"Z"))))
Discuss

Discussion

Thank you Don!  If I want to put in "get the ball" instead of "x" in cell 3, is there a way to show only "ball" in bold font?
RN34 (rep: 4) Sep 3, '16 at 12:56 am
First, edit your title to make it more descriptive, like I mentioned in the comment to your question.
don (rep: 1989) Sep 3, '16 at 10:11 am
Ok, thanks.
RN34 (rep: 4) Sep 4, '16 at 3:19 am
To answer your question, you can't output "ball" with a separate format from surrounding text using a formula. You can bold a single word in a cell using the regular formatting features, just not as the output of a formula.
don (rep: 1989) Sep 5, '16 at 11:24 am
Ok, thank you.
RN34 (rep: 4) Sep 8, '16 at 2:52 pm
Add to Discussion


Answer the Question

You must create an account to use the forum. Create an Account or Login