repeated values in cloumn A, return if column B=X at least in one row

epardo87

Board Regular
Joined
Feb 24, 2015
Messages
56
Hello there,

So I have:
  • column A where a value can be repeated unlimited times
  • column B can vary between X or Y
  • Column C is where the formula needs to go:
If value in column A contains an "X" in column B, in any of the rows where it appears, then "OK"

I'd really appreciate your help! regards!
AYOK
AYOK
AXOK
BY-
BY-
CY-

<tbody>
</tbody>
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Not sure I fully understand, Is this what you want?

assuming about data is in A1:B6 then in C1 put =if(B1="X","OK","")
fill down as needed

Ross
 
Upvote 0
thanks for your answer Ross,

if I do that, I will get "OK" only in row 3, and I also need that: given the fact that there is one row where A=X, then every other row with A has to be "OK" even if that specific column has a "Y"
 
Upvote 0
So if first column has an "A" or second column has an "X"?

try =IF(OR(B1="X",A1="A"),"OK","")

Ross
 
Upvote 0
Well not necessary.

in this example is "A" because it has an X in the third Row, so all other "A" will now have the "OK".
but if "A" doesn't have "X" then none should have "B"
here a larger example of the results required:

AYOK
AYOK
AXOK
BY-
BY-
BY-
CXOK
CYOK
CXOK
DY-
DY-
DY-
EYOK
EXOK
EYOK

<tbody>
</tbody>
 
Upvote 0
In you latest sample , why does group "E" have OK since it does NOT have an "X" in the third row??
 
Upvote 0
well, the "X" in column B could appear anywhere, in the first, third, fifth, etc.that's the main problem, I need the formula to tell me if that value in column A, has an "X" in any other appearance of same value at the table
 
Upvote 0
This is what I need the formula to evaluate:
AYA=X? NO, is there any other row where A=X? YES, then "OK"
AYA=X? NO, is there any other row where A=X? YES, then "OK"
AXA=X? YES, then "OK"
BYB=X? NO, is there any other row where B=X? NO, then "-"
BYB=X? NO, is there any other row where B=X? NO, then "-"
BYB=X? NO, is there any other row where B=X? NO, then "-"
CXC=X? YES, then "OK"
CYC=X? NO, is there any other row where C=X? YES, then "OK"
CXC=X? YES, then "OK"
DYD=X? NO, is there any other row where D=X? NO, then "-"
DYD=X? NO, is there any other row where D=X? NO, then "-"
DYD=X? NO, is there any other row where D=X? NO, then "-"
EYE=X? NO, is there any other row where E=X? YES, then "OK"
EXE=X? YES, then "OK"
EYE=X? NO, is there any other row where E=X? YES, then "OK"

<tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,215,641
Messages
6,125,979
Members
449,276
Latest member
surendra75

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