Hi Guys,

I'm trying to do if and statements to return costs from another sheet based on a drop-down list.

The list consists of three options - 3x2, 4x3 and other.
I have other drop-down lists that must also meet a condition to populate the cost.
For example, if it is TEF and Yes abd 3x2 then populate one cell, if TEF, Yes and 4x3 then populate another value.

So, I have started coding it, and I have it working for the first statement, but not when I try to add additional criteria.


=if(and(G25="Yes",G26="3x2",G27="TEF"),Comp!H27)
This works and populates the proper code. But when I try to add more it gives me the #VALUE! error.

=if(and(G25="Yes",G26="3x2",G27="TEF"),Comp!H27),if(and(G25="Yes",G26="4x3",G27="TEF"),Comp!H26),if(G25="No","0")
This is where I'm running into the problem. I think I understand that it is trying to meet all the conditions that are listed, and therefore is causing the problem, but I am not sure how I can write this so that I'm not running into this issue.

Any help would be greatly appreciated!