VBA advanced filters with multiple data in one cell

CsJHUN

Active Member
Joined
Jan 13, 2015
Messages
360
Office Version
  1. 365
  2. 2021
  3. 2019
Platform
  1. Windows
  2. Mobile
Hello guys,
I need your help again,i have this as an input
[TABLE="class: grid, width: 500"]
<colgroup><col style="mso-width-source:userset;mso-width-alt:3808;width:89pt" width="119"> <col style="mso-width-source:userset;mso-width-alt:3744; width:88pt" width="117" span="2"> <col style="mso-width-source:userset;mso-width-alt:3776;width:89pt" width="118"> </colgroup><tbody>[TR]
[TD="width: 119"]Colum A Headline
[/TD]
[TD="width: 117"]Colum B Headline[/TD]
[TD="width: 117"]Colum C Headline[/TD]
[TD="width: 118"]Colum D Headline[/TD]
[/TR]
[TR]
[TD]ValA/ValB/ValE
[/TD]
[TD]ValT/ValG[/TD]
[TD]ValA/ValC[/TD]
[TD]ValF
[/TD]
[/TR]
</tbody>[/TABLE]
I would like to get a result like this
[TABLE="class: grid, width: 500"]
<colgroup><col style="mso-width-source:userset;mso-width-alt:3808;width:89pt" width="119"> <col style="mso-width-source:userset;mso-width-alt:3744; width:88pt" width="117" span="2"> <col style="mso-width-source:userset;mso-width-alt:3776;width:89pt" width="118"> </colgroup><tbody>[TR]
[TD="width: 119"]Colum A Headline
[/TD]
[TD="width: 117"]Colum B Headline[/TD]
[TD="width: 117"]Colum C Headline[/TD]
[TD="width: 118"]Colum D Headline[/TD]
[/TR]
[TR]
[TD]ValA
[/TD]
[TD]ValT[/TD]
[TD]ValA[/TD]
[TD]ValF
[/TD]
[/TR]
[TR]
[TD]ValA[/TD]
[TD]ValT[/TD]
[TD]ValC[/TD]
[TD]ValF[/TD]
[/TR]
[TR]
[TD]ValA[/TD]
[TD]ValG[/TD]
[TD]ValA[/TD]
[TD]ValF[/TD]
[/TR]
[TR]
[TD]ValA[/TD]
[TD]ValG[/TD]
[TD]ValC[/TD]
[TD]ValF[/TD]
[/TR]
[TR]
[TD]ValB
[/TD]
[TD]ValT[/TD]
[TD]ValA[/TD]
[TD]ValF[/TD]
[/TR]
[TR]
[TD]ValB
[/TD]
[TD]ValT[/TD]
[TD]ValC[/TD]
[TD]ValF[/TD]
[/TR]
[TR]
[TD]ValB[/TD]
[TD]ValG[/TD]
[TD]ValA[/TD]
[TD]ValF[/TD]
[/TR]
[TR]
[TD]ValB[/TD]
[TD]ValG[/TD]
[TD]ValC[/TD]
[TD]ValF[/TD]
[/TR]
[TR]
[TD]ValE[/TD]
[TD]ValT
[/TD]
[TD]ValA
[/TD]
[TD]ValF[/TD]
[/TR]
[TR]
[TD]ValE[/TD]
[TD]ValT[/TD]
[TD]ValC[/TD]
[TD]ValF[/TD]
[/TR]
[TR]
[TD]ValE[/TD]
[TD]ValG[/TD]
[TD]ValA[/TD]
[TD]ValF[/TD]
[/TR]
[TR]
[TD]ValE[/TD]
[TD]ValG[/TD]
[TD]ValC[/TD]
[TD]ValF
[/TD]
[/TR]
</tbody>[/TABLE]

Basicly every text value separated with "/" for each cell in range("A2:B2") resulted as a 2D matrix. I need this for advanced filter a table.
Please see it as like this: (ValA or ValB orValE) and (ValT or ValG) and (ValA/ValC) and (ValF).
Cannot be sure it will be always 3-2-2-1 filter value in the cells, it could be i-j-k-l (this could be 1-1-1-2, or 2-1-2-2, or 18-2-21-53, or ... i guess u get it, BTW the max numbers could be 62-28-6-5) :)

Any advice, code, code snippets are welcome.

Thanks!
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.

Forum statistics

Threads
1,223,889
Messages
6,175,223
Members
452,620
Latest member
dsubash

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