Conditional Statement Question with VLOOKUP

RBusiness

Board Regular
Joined
Sep 18, 2010
Messages
187
Hello,

I'm hoping you can help?

I have two Sheets. One named "sheet" and the other called "data".
In "sheet" i have a list of text, numbers and characters.

From "sheet" I want to look at "data" and see if the characters in a cell in "data" A1 (just an example) is found in column C of "data" and say "YES" only if the word in the adjacent cell matches the word "green".


SHEET (BEFORE)
widget 1000
no widgets here
widgets 3000
widget 9000

<tbody>
</tbody>








DATA (The other sheet)
Has the data I'm referencing.

ABCD
yellowwidgets 3000
redno widgets here
greenwidget 9000
greenwidget 1000

<tbody>
</tbody>










SHEET (AFTER)
This is the result that I'm looking for. It should say "yes" when "widget 1000" or any of the other phrase exist in column C and have the word "green" in the adjacent cell.
widget 1000YES
no widgets hereNO
widgets 3000NO
widget 9000YES

<tbody>
</tbody>








What do you think?
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Depending on the version of excel you have maybe ​....

Excel 2012
ABC
1WidgetYes or NoYes or No
2widget 1000YesYes
3no widgets hereNoNo
4widgets 3000NoNo
5widget 9000YesYes

<colgroup><col style="width: 25pxpx"><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet

Worksheet Formulas
CellFormula
B2=IF(SUMPRODUCT((Data!$B$2:$B$5="green")*(Data!$C$2:$C$5=A2)),"Yes","No")
C2=IF(COUNTIFS(Data!$B$2:$B$5,"green",Data!$C$2:$C$5,Sheet!A2),"Yes","No")

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>
 
Upvote 0
One similar and another one....

=IF(SUMPRODUCT(--(A1=Data!$C$2:$C$5),--("green"=Data!$B$2:$B$5))=1,"Yes","No")

<tbody>
</tbody><colgroup><col></colgroup>
=IF(OFFSET(Data!$B$1,MATCH(A1,Data!$C$2:$C$5,0),)="green","Yes","No")

<tbody>
</tbody><colgroup><col></colgroup>
 
Upvote 0

Forum statistics

Threads
1,215,420
Messages
6,124,803
Members
449,190
Latest member
cindykay

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