Extract match of header patterns

Kishan

Well-known Member
Joined
Mar 15, 2011
Messages
1,648
Office Version
  1. 2010
Platform
  1. Windows
Hi,</SPAN></SPAN>

Data column is column C</SPAN></SPAN>

Header F2:H3 values are brought by formula and F4:H4 values are consonants </SPAN></SPAN>
Header-1 F2:F4 = Pattern 2X1</SPAN></SPAN>
Header-2 G2:G4 = Pattern 2XX</SPAN></SPAN>
Header-3 H2:H4 = Pattern 2X2</SPAN></SPAN>

I want that look each header pattern in the column C and bring out the match pattern and place in their corresponding columns as shown below in example</SPAN></SPAN>


Book1
ABCDEFGHIJ
1
2222
3XXX
41X2
5P1P1P1P1
6X
71
8X
922
10XX
11XX
12X
13X
1422
15XX
1611
17X
181
191
2022
21XX
2222
23X
241
251
261
27X
28X
2922
30XX
3111
32X
331
341
3522
36XX
3711
38X
392
401
411
4222
43XX
44XX
451
461
472
482
491
50X
51X
521
5322
54XX
5511
56X
571
581
5922
60XX
6122
621
632
64
65
66
Sheet12


Thank you in advance</SPAN></SPAN>

Using Excel 2000</SPAN></SPAN>

Regards,</SPAN></SPAN>
Kishan</SPAN></SPAN>
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Put this formula in F6 and copy across then downwards. Your software is antiquated, so you might need to enter it with Ctrl+Shift+Enter. Note that your sample missed one match starting on Row 22 for the F-key (2 X 1).

F6
Code:
=IF(OR(AND(OFFSET($C6,0,,3)=F$2:F$4),AND(OFFSET($C6,-1,,3)=F$2:F$4),AND(OFFSET($C6,-2,,3)=F$2:F$4)),$C6,"")
 
Last edited:
Upvote 0
Note that your sample missed one match starting on Row 22 for the F-key (2 X 1).

F6
Code:
=IF(OR(AND(OFFSET($C6,0,,3)=F$2:F$4),AND(OFFSET($C6,-1,,3)=F$2:F$4),AND(OFFSET($C6,-2,,3)=F$2:F$4)),$C6,"")
DRSteele, yes noticed after applying the formula it was missing thank you for the observations


Put this formula in F6 and copy across then downwards. Your software is antiquated, so you might need to enter it with Ctrl+Shift+Enter.
F6
Code:
=IF(OR(AND(OFFSET($C6,0,,3)=F$2:F$4),AND(OFFSET($C6,-1,,3)=F$2:F$4),AND(OFFSET($C6,-2,,3)=F$2:F$4)),$C6,"")
DRSteele, superb it worked perfect as required. </SPAN></SPAN>

I do appreciate for your kind help
</SPAN></SPAN>

Kind Regards,
</SPAN></SPAN>
Kishan
</SPAN></SPAN>:)
 
Upvote 0

Forum statistics

Threads
1,223,896
Messages
6,175,264
Members
452,627
Latest member
KitkatToby

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