I just started to learn VBA few days ago and trying to sort out a filtering problem and hope to get some idea.
I have a column of ID that the format is like "C_1_1", "C_1_11", "C_12_11".
The criteria was using the string before the first '' symbol and string after second '' symbol to find matching ID like head and tail e.g. "C_20_2" <-- "C_" and "2". In VBA I tried to use Filter function to filter data that match "C" then 2nd filter that match "_2"
However, the problem I am facing is that because the middle part of the ID is also in a format of "_xx" so there will be unwanted data like in the picture below that all the non-highlighted data is not relevant. Is there any suggestion I can filter or extract only the data in yellow colour? Any suggestion would be appreciated. Thank you so much.
Filter Data
Excel
If you have Microsoft 365, without too much thinking, in cell
G2
you could simply use:VBA