Copy paste match of the horizontal "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:E</SPAN></SPAN>

Header H2:I4 values are brought by formula and J2:J4 values are consonants </SPAN></SPAN>
Header-1 H2:J2 = Pattern XX1</SPAN></SPAN>
Header-2 H3:J3 = Pattern XXX</SPAN></SPAN>
Header-3 H4:J4 = Pattern XX2</SPAN></SPAN>

I want that look each header pattern in the column C, D & E if header match found then copy the pattern and paste in their corresponding row in the column H, I & J as shown below in example</SPAN></SPAN>


Book1
ABCDEFGHIJKL
1
2XX1
3XXX
4XX2
5P1P2P3P1P2P3
6X11
7XX2XX2
8X11
9111
10XX1XX1
11111
12XX1XX1
13211
141XX
15X11
16X21
17X12
18111
19XXXXXX
202X2
21XX1XX1
22XX1XX1
2311X
24111
252X1
26XX1XX1
2711X
281X1
2911X
301X1
31XX2XX2
3221X
33XX2XX2
341X2
35X2X
36211
37111
381X2
39XX1XX1
40XXXXXX
41XX2XX2
42112
43X11
44111
452X1
4611X
47111
48111
492X2
5021X
51111
52X12
531X2
54
55
56
Sheet18


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

Using Excel 2000</SPAN></SPAN>

Regards,</SPAN></SPAN>
Kishan</SPAN></SPAN>
 
Last edited:

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
You can do what you asked for with a simple formula. Put this formula in cell H6 and copy it across to cell J6, then copy those three cells (H6:J6) down to the bottom of your data...

=IF(AND($C6="X",$D6="X"),C6,"")
 
Upvote 0
You can do what you asked for with a simple formula. Put this formula in cell H6 and copy it across to cell J6, then copy those three cells (H6:J6) down to the bottom of your data...

=IF(AND($C6="X",$D6="X"),C6,"")
Rick, thank you for the formula it is giving a desire result as per post#1 given example</SPAN></SPAN>

But may I want a formula to be linked with the header patterns because header patterns are not fixed all the time it can be changing like as H2:J2 = 1X1, H3:J3 = 1X2, H4:J4 = 1X2 or it can be like as H2:J2 = 211, H3:J3 = 212, H4:J4 = 212 does it is possible to formula could work within all situations
</SPAN></SPAN>

Kind Regards,
</SPAN></SPAN>
kishan
</SPAN></SPAN>
 
Upvote 0
Okay, give this more general formula a try...

=IF(OR($C6&$D6&$E6=$H$2&$I$2&$J$2,$C6&$D6&$E6=$H$3&$I$3&$J$3,$C6&$D6&$E6=$H$4&$I$4&$J$4),C6,"")
 
Upvote 0
Okay, give this more general formula a try...

=IF(OR($C6&$D6&$E6=$H$2&$I$2&$J$2,$C6&$D6&$E6=$H$3&$I$3&$J$3,$C6&$D6&$E6=$H$4&$I$4&$J$4),C6,"")
Rick, it is a superb working perfect with every change in the header patterns. </SPAN></SPAN>

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

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

Forum statistics

Threads
1,224,823
Messages
6,181,177
Members
453,021
Latest member
Justyna P

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