If statement bringing back 2 true values

Imran Azam

Board Regular
Joined
Mar 15, 2011
Messages
103
Hi ,

I have the look up table below

[TABLE="width: 30"]
<tbody>[TR]
[TD] A[/TD]
[TD] B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]STATUS[/TD]
[/TR]
[TR]
[TD]YES[/TD]
[TD]YES[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]GOOD[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]NO[/TD]
[TD]NO[/TD]
[TD]FAST[/TD]
[TD]BAD[/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="width: 409"]
<tbody>[TR]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
i have a table of data below and i need to pick the correct status based on the rules in the look up table.

[TABLE="width: 40"]
<tbody>[TR]
[TD]name[/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]STATUS[/TD]
[/TR]
[TR]
[TD]craig[/TD]
[TD]yes[/TD]
[TD]yes[/TD]
[TD]no[/TD]
[TD]no[/TD]
[TD]fast[/TD]
[TD]GOOD[/TD]
[/TR]
</tbody>[/TABLE]

now i used the following statement to pick the status ( good) up IF(AND($A$2=B8,$B$2=C8),$F$2,IF(AND($C$3=D8,$D$3=E8,$E$3=F8),$F$3,""))

i want to know how i can pull back tWo true value because, the above data matches both the good and bad status rule , is this possible? IT SHOULD looks like the below

[TABLE="width: 40"]
<tbody>[TR]
[TD]name[/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]STATUS[/TD]
[TD]status2[/TD]
[/TR]
[TR]
[TD]craig[/TD]
[TD]yes[/TD]
[TD]yes[/TD]
[TD]no[/TD]
[TD]no[/TD]
[TD]fast[/TD]
[TD]GOOD[/TD]
[TD]BAD[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Re: help needed if statement bringing back 2 true values

All you have to do is split up your formula and place the first IF(AND statement in columnSTATUS and the second IF(AND statement in columnSTATUS2.
 
Upvote 0
Re: help needed if statement bringing back 2 true values

thank you , but how will that work will they both bring back different status?
 
Upvote 0
Re: help needed if statement bringing back 2 true values

thank you , but how will that work will they both bring back different status?


Since it will be blank if there's no match, these will be your possibilities:

[TABLE="width: 500"]
<tbody>[TR]
[TD]STATUS[/TD]
[TD]STATUS2[/TD]
[/TR]
[TR]
[TD]GOOD[/TD]
[TD]BAD[/TD]
[/TR]
[TR]
[TD]GOOD[/TD]
[TD]""[/TD]
[/TR]
[TR]
[TD]""[/TD]
[TD]BAD[/TD]
[/TR]
[TR]
[TD]""[/TD]
[TD]""[/TD]
[/TR]
</tbody>[/TABLE]


How you use this data will depend on how you'll utilize the results.
 
Last edited:
Upvote 0
Re: help needed if statement bringing back 2 true values

AH ok thanks but i need the formula to be able to fill the first status and if its matches a second status only then use the status 2 , dont know if this can be done, thank you for your help
 
Upvote 0

Forum statistics

Threads
1,223,886
Messages
6,175,198
Members
452,616
Latest member
intern444

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