hi,
Can i know how to find subsets of a master set in excel sheet
for eg
s1 has v1 v2 v3 v4 v5
s2 has v3 v5
s3 has v3 v7
s1 is master and how can i find s2 as subset of s1 and s3 in not
hi,
Can i know how to find subsets of a master set in excel sheet
for eg
s1 has v1 v2 v3 v4 v5
s2 has v3 v5
s3 has v3 v7
s1 is master and how can i find s2 as subset of s1 and s3 in not
not sure what you have but it's usually better to start with everything in a separate cell
"Unless otherwise stated all my comments are directed at OP"
Mojito connoisseur and now happily retired
where does code go ?
look here
how to insert code
how to enter array formula
why use -- in sumproduct
recommended reading
wiki Mojito
how to say no convincingly
most important thing you need
Martin Wilson: SPV
and RSMBC
yeah i placed each entry of s1 in seperate cell and same with s2 and s3
data is placed in following fashion
A1 -> s1
B1 -> v1
C1 -> v2
D1 -> v3
E1 -> v4
F1 -> v5
A2 -> s2
B2 -> v3
C2-> v5
A3 -> s3
B2 -> v3
C3 -> v7
s1 is master and how can i find s2 as subset of s1 and s3 in not using a logic in excel (not manually)?????? plz help
Last edited by shree143; 04-05-2011 at 12:23 AM.
Assuming that all of your data is in columns B through F, you could insert the following formula in cell G2:
=IF(SUM(IF(ISERROR(HLOOKUP(B2,$B$1:$F$1,1,FALSE)),0,1),IF(ISERROR(HLOOKUP(C2,$B$1:$F$1,1,FALSE)),0,1),IF(ISERROR(HLOOKUP(D2,$B$1:$F$1,1,FALSE)),0,1),IF(ISERROR(HLOOKUP(E2,$B$1:$F$1,1,FALSE)),0,1),IF(ISERROR(HLOOKUP(F2,$B$1:$F$1,1,FALSE)),0,1))=COUNTA(B2:F2),"Yes","No")
You can then drag the formula down for subsequent rows.
This formula works by comparing the sum of the items found to the sum of the items looked for, and returns a yes if they are equal. You can expand this as far as you want by adding other terms to the sum and expanding the hlookup and counta ranges accordingly. Note that if there is no data to check, the formula returns a "yes" because 0=0. This could be adjusted if you want.
Sorry for resurrecting a year old post. I saw the challange and couldn't resist. I hope this helps someone.
Last edited by horvack; 05-01-2012 at 03:45 PM.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks