Grahamfff   10 #1 Posted March 30, 2017 I have a spreadsheet in which Column A has a list of membership numbers for people in a club:  1 2 3 4 5 6 Etc  In column C is a list of membership numbers of a subgroup of these people:  1 4 5  In Column B I want to have 'Yes' inserted for each row - so it will appear as:  1 Yes 2 3 4 Yes 5 Yes 6  Any ideas how I can do this? It might be to do with Excel's vlookup function but this isn't something I've used or understand.  Any help appreciated! Share this post Link to post Share on other sites Share this content via...
Cyclone   10 #2 Posted March 30, 2017 (edited) So in column B it will say yes if the value in column A is contained in column C anywhere?  =COUNTIF(range,value)>0  For example  =COUNTIF($C$1:$C$3;A1)  Where $C$1:$C:$3 is your subset and A1 is the cell to the left (so this statement is written in B1).  This will give you the value 1.  If 1 must say yes then this will need wrapping in an if  =if(B1>0,"Yes","No")  combine the two  =if(COUNTIF($C$1:$C$3;A1)>0,"Yes","No") Edited March 30, 2017 by Cyclone Share this post Link to post Share on other sites Share this content via...
Grahamfff   10 #3 Posted March 30, 2017 So in column B it will say yes if the value in column A is contained in column C anywhere?  Yes, that's it.  PS Looks like we're neighbours! Share this post Link to post Share on other sites Share this content via...
sgtkate   10 #4 Posted March 30, 2017 This would do you:  =IF(MATCH(A1,C:C,0),"Yes","No")  It does give nasty #N/A errors on rows with no match so cyclones answer is probably better! Share this post Link to post Share on other sites Share this content via...
Grahamfff   10 #5 Posted March 30, 2017 (edited) Brilliant - thanks very much!  So in column B it will say yes if the value in column A is contained in column C anywhere? =COUNTIF(range,value)>0  For example  =COUNTIF($C$1:$C$3;A1)  Where $C$1:$C:$3 is your subset and A1 is the cell to the left (so this statement is written in B1).  This will give you the value 1.  If 1 must say yes then this will need wrapping in an if  =if(B1>0,"Yes","No")  combine the two  =if(COUNTIF($C$1:$C$3;A1)>0,"Yes","No")  ---------- Post added 30-03-2017 at 15:54 ----------  This would do you: =IF(MATCH(A1,C:C,0),"Yes","No")  It does give nasty #N/A errors on rows with no match so cyclones answer is probably better!  I actually used Cyclone's solution but thanks to you also for taking the trouble to help. Edited March 30, 2017 by Grahamfff Share this post Link to post Share on other sites Share this content via...