Reverse-Filter-List-of-Items searching with a string of itens

rodrigobertollo

New Member
Joined
May 27, 2021
Messages
5
Office Version
  1. 365
Platform
  1. Windows
Hi guys,

Recently I've seen a workaround in this forum that made me think if this is also possible.

I have a file with expected gene coverage and I have genetic exams with a string of genes.
I have to check if the each gene is covered in each exam. However, for each search I need to transform the string of genes to a lis of itens. I want to transfer this task and reduce the complexity with a search similar of the image above:

1622203221494.png


Can this example be doable?

By the way, I also suffer with the partial match, since some genes names overlap (like NF2 and F2), I also need the search to be full match, my workaround for full match was to add spacial characters before and after the gene name so it would be unic.
1622203652331.png


Solving this also reduce the complexity of the task.

Thank you
Rodrigo
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Can you post some sample data.

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
 
Upvote 0
Can you post some sample data.

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
Hi

I've download this table from the internet, did not chance the code imbued on the file

CSTMV2 expected Coverage.xlsx
ABCDEFGHIJK
1GeneTranscriptChrStartEnd50x60x70xPartial Match FilterFilter List
2|PIK3CD/NM_005026.5chr197104509727051100.00%100.00%100.00% |ATM/
3|KIF1B/NM_015074.3chr11023232310376592100.00%100.00%100.00% |BLM/
4|TARDBP/NM_007375.4chr11101372211022659100.00%100.00%100.00% |BRCA1/
5|MTHFR/NM_005957.5chr1117906741180312138.07%37.05%35.72% |BRCA2/
6|PLOD1/NM_000302.4chr11193477411974813100.00%100.00%100.00% |CBL/
7|CTRC/NM_007272.3chr11543845915446594100.00%100.00%100.00% |CEBPA/
8|SDHB/NM_003000.3chr11701887517054024100.00%100.00%100.00% |CHEK2/
9|ALPL/NM_000478.6chr12155407621577653100.00%100.00%100.00% |DDX41/
10|MLH1/NM_000249.4chr3369935423705065899.35%99.16%98.96%|MLH1/|ETV6/
11|GALE/NM_000403.4chr12379594323799012100.00%100.00%100.00% |GATA2/
12|LDLRAP1/NM_015627.3chr12554369325566997100.00%100.00%100.00% |IKZF1/
13|P3H1/NM_022356.4chr14274669142766976100.00%100.00%100.00% |MLH1/
14|SLC2A1/NM_006516.4chr14292703542958656100.00%100.00%100.00% |MSH2/
15|BRIP1/NM_032043.3chr17616832906186154499.99%99.98%99.95% |MSH6/
16|PTCH2/NM_003738.5chr14482240944842937100.00%100.00%100.00% |NBN/
17|MUTYH/NM_001128425.2chr14532930045340259100.00%100.00%100.00% 
18|FOXE3/NM_012186.3chr14741631047417280100.00%100.00%100.00% 
19|PCSK9/NM_174936.4chr15503983255063589100.00%100.00%100.00% 
20|ACADM/NM_000016.6chr17572478275762768100.00%100.00%100.00% 
21|MSH6/NM_000179.3chr24778322847806865100.00%100.00%99.98%|MSH6/
22|DPYD/NM_000110.4chr1970789709792092795.61%95.49%95.34% 
23|AGL/NM_000028.2chr19985103799921656100.00%100.00%100.00% 
Custom Média
Cell Formulas
RangeFormula
F2:H9,F11:H14,F16:H20,F22:H23F2=AVERAGE('D:\Coisas trabalho\CSTM V2\Validação\[Validação round 1.xlsx]002:016'!J2)
I2:I23I2=IFERROR(LOOKUP(1E+100,SEARCH(tblFilterList5[Filter List],[@Gene]),tblFilterList5[Filter List]),"")
F10:H10F10=AVERAGE('D:\Coisas trabalho\CSTM V2\Validação\[Validação round 1.xlsx]002:016'!J102)
F15:H15F15=AVERAGE('D:\Coisas trabalho\CSTM V2\Validação\[Validação round 1.xlsx]002:016'!J422)
F21:H21F21=AVERAGE('D:\Coisas trabalho\CSTM V2\Validação\[Validação round 1.xlsx]002:016'!J62)


This is the example of the file
thnkz for the suggestion Fluff
 
Upvote 0
Sorry but I don't understand, doesn't the formula in col I already do what you want?
 
Upvote 0
Sorry, I posted what I have been using.

You mentioned what I needed to be done?

CSTMV2 expected Coverage.xlsx
ABCDEFGHIJK
1GeneTranscriptChrStartEnd50x60x70xPartial Match FilterFilter List
2|PIK3CD/NM_005026.5chr197104509727051100.00%100.00%100.00% ATM/BLM/BRCA1/BRCA2/CBL/CEBPA/CHEK2/DDX41/ETV6/GATA2/IKZF1/MLH1/MSH2/MSH6/NBN/
3|KIF1B/NM_015074.3chr11023232310376592100.00%100.00%100.00% 
4|TARDBP/NM_007375.4chr11101372211022659100.00%100.00%100.00% 
5|MTHFR/NM_005957.5chr1117906741180312138.07%37.05%35.72% 
6|PLOD1/NM_000302.4chr11193477411974813100.00%100.00%100.00% 
7|CTRC/NM_007272.3chr11543845915446594100.00%100.00%100.00% 
8|SDHB/NM_003000.3chr11701887517054024100.00%100.00%100.00% 
9|ALPL/NM_000478.6chr12155407621577653100.00%100.00%100.00% 
10|MLH1/NM_000249.4chr3369935423705065899.35%99.16%98.96% 
11|GALE/NM_000403.4chr12379594323799012100.00%100.00%100.00% 
12|LDLRAP1/NM_015627.3chr12554369325566997100.00%100.00%100.00% 
13|P3H1/NM_022356.4chr14274669142766976100.00%100.00%100.00% 
14|SLC2A1/NM_006516.4chr14292703542958656100.00%100.00%100.00% 
15|BRIP1/NM_032043.3chr17616832906186154499.99%99.98%99.95% 
16|PTCH2/NM_003738.5chr14482240944842937100.00%100.00%100.00% 
17|MUTYH/NM_001128425.2chr14532930045340259100.00%100.00%100.00% 
18|FOXE3/NM_012186.3chr14741631047417280100.00%100.00%100.00% 
19|PCSK9/NM_174936.4chr15503983255063589100.00%100.00%100.00% 
20|ACADM/NM_000016.6chr17572478275762768100.00%100.00%100.00% 
21|MSH6/NM_000179.3chr24778322847806865100.00%100.00%99.98% 
22|DPYD/NM_000110.4chr1970789709792092795.61%95.49%95.34% 
23|AGL/NM_000028.2chr19985103799921656100.00%100.00%100.00% 
Custom Média
Cell Formulas
RangeFormula
F2:H9,F11:H14,F16:H20,F22:H23F2=AVERAGE('D:\Coisas trabalho\CSTM V2\Validação\[Validação round 1.xlsx]002:016'!J2)
I2:I23I2=IFERROR(LOOKUP(1E+100,SEARCH(tblFilterList5[Filter List],[@Gene]),tblFilterList5[Filter List]),"")
F10:H10F10=AVERAGE('D:\Coisas trabalho\CSTM V2\Validação\[Validação round 1.xlsx]002:016'!J102)
F15:H15F15=AVERAGE('D:\Coisas trabalho\CSTM V2\Validação\[Validação round 1.xlsx]002:016'!J422)
F21:H21F21=AVERAGE('D:\Coisas trabalho\CSTM V2\Validação\[Validação round 1.xlsx]002:016'!J62)


I needed the result from the post above with the string search from this example.
 
Upvote 0
Ok, thanks for that, how about
+Fluff 1.xlsm
ABCDEFGHIJK
1GeneTranscriptChrStartEnd50x60x70xPartial Match FilterFilter List
2PIK3CDNM_005026.5chr197104509727051100.00%100.00%100.00% ATM/BLM/BRCA1/BRCA2/CBL/CEBPA/CHEK2/DDX41/ETV6/GATA2/IKZF1/MLH1/MSH2/MSH6/NBN/
3KIF1BNM_015074.3chr11023232310376592100.00%100.00%100.00% 
4TARDBPNM_007375.4chr11101372211022659100.00%100.00%100.00% 
5MTHFRNM_005957.5chr1117906741180312138.07%37.05%35.72% 
6PLOD1NM_000302.4chr11193477411974813100.00%100.00%100.00% 
7CTRCNM_007272.3chr11543845915446594100.00%100.00%100.00% 
8SDHBNM_003000.3chr11701887517054024100.00%100.00%100.00% 
9ALPLNM_000478.6chr12155407621577653100.00%100.00%100.00% 
10MLH1NM_000249.4chr3369935423705065899.35%99.16%98.96%MLH1
11GALENM_000403.4chr12379594323799012100.00%100.00%100.00% 
12LDLRAP1NM_015627.3chr12554369325566997100.00%100.00%100.00% 
13P3H1NM_022356.4chr14274669142766976100.00%100.00%100.00% 
14SLC2A1NM_006516.4chr14292703542958656100.00%100.00%100.00% 
15BRIP1NM_032043.3chr17616832906186154499.99%99.98%99.95% 
16PTCH2NM_003738.5chr14482240944842937100.00%100.00%100.00% 
17MUTYHNM_001128425.2chr14532930045340259100.00%100.00%100.00% 
18FOXE3NM_012186.3chr14741631047417280100.00%100.00%100.00% 
19PCSK9NM_174936.4chr15503983255063589100.00%100.00%100.00% 
20ACADMNM_000016.6chr17572478275762768100.00%100.00%100.00% 
21MSH6NM_000179.3chr24778322847806865100.00%100.00%99.98%MSH6
22DPYDNM_000110.4chr1970789709792092795.61%95.49%95.34% 
23AGLNM_000028.2chr19985103799921656100.00%100.00%100.00% 
24
Lists
Cell Formulas
RangeFormula
I2:I23I2=IF(ISNA(MATCH(A2,FILTERXML("<k><m>"&SUBSTITUTE($K$2,"/","</m><m>")&"</m></k>","//m"),0)),"",A2)
 
Upvote 0
Solution

Forum statistics

Threads
1,214,646
Messages
6,120,720
Members
448,986
Latest member
andreguerra

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