All,
I have been using VLOOKUP for a long time now. But, there are many limitations to that. This one below is an example where I couldn't complete with VLOOKUP.
Lets say we have 6x2 rows in "sheet1". [TABLE="width: 100"]
<tbody>[TR]
[TD]XXX[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]YYY[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]BBB[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]BBB[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]OOO[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]PPP[/TD]
[TD]1[/TD]
[/TR]
</tbody>[/TABLE]
Now, I have 10x2 rows in "sheet2". I have to search for col1[sheet2] in col1[sheet1]. If it is present, then I should put "YES" in col2[sheet2]. Below are the scenarios, where I get trouble.
Is there a method to over come this limitation of VLOOKUP? Any other script or formula to get this thing done?
[TABLE="width: 100"]
<tbody>[TR]
[TD]XXX[/TD]
[TD]YES[/TD]
[/TR]
[TR]
[TD]YYY[/TD]
[TD]YES[/TD]
[/TR]
[TR]
[TD]YYY[/TD]
[TD]YES[/TD]
[/TR]
[TR]
[TD]XXX[/TD]
[TD]NO[/TD]
[/TR]
[TR]
[TD]BBB[/TD]
[TD]YES[/TD]
[/TR]
[TR]
[TD]NNN[/TD]
[TD]NO[/TD]
[/TR]
[TR]
[TD]EEE[/TD]
[TD]NO[/TD]
[/TR]
[TR]
[TD]OOO[/TD]
[TD]YES[/TD]
[/TR]
[TR]
[TD]BBB[/TD]
[TD]YES[/TD]
[/TR]
[TR]
[TD]SSS[/TD]
[TD]NO[/TD]
[/TR]
</tbody>[/TABLE]
I have been using VLOOKUP for a long time now. But, there are many limitations to that. This one below is an example where I couldn't complete with VLOOKUP.
Lets say we have 6x2 rows in "sheet1". [TABLE="width: 100"]
<tbody>[TR]
[TD]XXX[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]YYY[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]BBB[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]BBB[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]OOO[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]PPP[/TD]
[TD]1[/TD]
[/TR]
</tbody>[/TABLE]
Now, I have 10x2 rows in "sheet2". I have to search for col1[sheet2] in col1[sheet1]. If it is present, then I should put "YES" in col2[sheet2]. Below are the scenarios, where I get trouble.
- XXX value on sheet1 is just1. So in Sheet2, I should get "YES" for only 1 row. But on VLOOKUP, I get "YES" for both.
- BBB is present twice in sheet1. No matter how many times BBB occur in sheet2, I get YES for all
Is there a method to over come this limitation of VLOOKUP? Any other script or formula to get this thing done?
[TABLE="width: 100"]
<tbody>[TR]
[TD]XXX[/TD]
[TD]YES[/TD]
[/TR]
[TR]
[TD]YYY[/TD]
[TD]YES[/TD]
[/TR]
[TR]
[TD]YYY[/TD]
[TD]YES[/TD]
[/TR]
[TR]
[TD]XXX[/TD]
[TD]NO[/TD]
[/TR]
[TR]
[TD]BBB[/TD]
[TD]YES[/TD]
[/TR]
[TR]
[TD]NNN[/TD]
[TD]NO[/TD]
[/TR]
[TR]
[TD]EEE[/TD]
[TD]NO[/TD]
[/TR]
[TR]
[TD]OOO[/TD]
[TD]YES[/TD]
[/TR]
[TR]
[TD]BBB[/TD]
[TD]YES[/TD]
[/TR]
[TR]
[TD]SSS[/TD]
[TD]NO[/TD]
[/TR]
</tbody>[/TABLE]