Trouble with 'If' and 'And' Statements

mcwigs

New Member
Joined
Sep 15, 2016
Messages
4
Hi guys,

First time really using excel so I know my understanding of the language isn't fantastic so please bear with me.

I have used the data validation method/tool to create two drop down lists in cells C2 and C3 - one has 4 parameters (C2) and the other only has 2 parameters (C3). I am trying to create a statement that pulls different cells from another sheet depending on the drop down box selection. e.g. If the user selects "egg" and "dry" then a question only related to those two answers would appear in that cell.

I am using an =If(AND()) statement to do this and since I have technically 8 different questions (4 true statements and 4 false) there are too many arguments within my statement.

An example of the code is
=IF(AND($C$2="Egg",$C$3="Wet"),Code!F48,Code!I48,IF(AND($C$2="Tadpole",$C$3="Wet"),Code!F53,Code!I53))

- I have two more parameters which would follow on from this statement, and was wondering if what I am trying to do was possible?

I also understand that this would be simple for most experienced user, but I am struggling and would appreciated any type of help or knowledge!

Thanks in advance :)
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
You expected result like this ??

[TABLE="class: grid, width: 500, align: center"]
<tbody>[TR]
[TD]EGG[/TD]
[TD]F48[/TD]
[/TR]
[TR]
[TD]WET[/TD]
[TD]I48[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
Put these formula and change the bold word as per your requirement!

Putt this in D2

Code:
=IF(AND($C$2="Egg",$C$3="Wet"),code!F48,IF(AND($C$2="Tadpole",$C$3="Wet"),code![B]F53[/B],IF(AND($C$2="[B]yourword[/B]",$C$3="[B]yourword[/B]"),code![B]F58[/B],IF(AND($C$2="[B]yourword[/B]",$C$3="[B]yourword[/B]"),code![B]F63[/B],0))))

Putt this in D3

Code:
=IF(AND($C$2="Egg",$C$3="Wet"),code![B]F48[/B],IF(AND($C$2="Tadpole",$C$3="Wet"),code![B]F53[/B],IF(AND($C$2="[B]yourword[/B]",$C$3="[B]yourword[/B]"),code![B]F58[/B],IF(AND($C$2="[B]yourword[/B]",$C$3="[B]yourword[/B]"),code![B]F63[/B],0))))
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,243
Messages
6,170,971
Members
452,371
Latest member
Frana

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top