Insert range of cells based on matching two cells - No VBA

martinofyre

New Member
Joined
Dec 16, 2008
Messages
28
The data:

<tbody>
</tbody>

<tbody>
[TD="class: xl72, width: 61"]A[/TD]
[TD="class: xl72, width: 61"]B[/TD]
[TD="class: xl72, width: 61"]C[/TD]
[TD="class: xl72, width: 61"]D[/TD]
[TD="class: xl72, width: 61"]E[/TD]
[TD="class: xl72, width: 61"]F[/TD]

[TD="class: xl73, align: right"]1[/TD]
[TD="class: xl74, width: 61"]2018[/TD]
[TD="class: xl75, width: 61"][/TD]
[TD="class: xl75, width: 61"][/TD]
[TD="class: xl75, width: 61"][/TD]
[TD="class: xl75, width: 61"][/TD]
[TD="class: xl75, width: 61"][/TD]

[TD="class: xl73, align: right"]2[/TD]
[TD="class: xl74, width: 61"]2018[/TD]
[TD="class: xl75, width: 61"]JAN[/TD]
[TD="class: xl75, width: 61"]JAN[/TD]
[TD="class: xl75, width: 61"]JAN[/TD]
[TD="class: xl75, width: 61"]JAN[/TD]
[TD="class: xl75, width: 61"]JAN[/TD]

[TD="class: xl73, align: right"]3[/TD]
[TD="class: xl74, width: 61"]2018[/TD]
[TD="class: xl76, width: 61"]05/01/2018[/TD]
[TD="class: xl76, width: 61"]12/01/2018[/TD]
[TD="class: xl76, width: 61"]19/01/2018[/TD]
[TD="class: xl76, width: 61"]26/01/2018[/TD]
[TD="class: xl76, width: 61"]02/02/2018[/TD]

[TD="class: xl73, align: right"]4[/TD]
[TD="class: xl74, width: 61"]2018[/TD]
[TD="class: xl74, width: 61"]1[/TD]
[TD="class: xl74, width: 61"]2[/TD]
[TD="class: xl74, width: 61"]3[/TD]
[TD="class: xl74, width: 61"]4[/TD]
[TD="class: xl74, width: 61"]5[/TD]

</tbody>

The requirement:
If A2,A3,A4 = A1 then insert rows 2,3,4 starting column B into rows 6,7,8 starting column B

This needs to be done across many years so looking for an HLOOKUP or INDEX and MATCH to achieve this.
No VBA solutions please if possible.

Thanks for any help.
 
Last edited:

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
If all three cells must be = to A1 then

Excel 2010
ABCDEF
12018
22018JanJanJanJanJan
320181/5/20181/12/20181/19/20181/26/20182/2/2018
4201812347
5
6JanJanJanJanJan
71/5/20181/12/20181/19/20181/26/20182/2/2018
812347
Sheet4
Cell Formulas
RangeFormula
B6=IF(AND($A$2=$A$1,$A$3=$A$1,$A$4=$A$1),B2,"")
B7=IF(AND($A$2=$A$1,$A$3=$A$1,$A$4=$A$1),B3,"")
B8=IF(AND($A$2=$A$1,$A$3=$A$1,$A$4=$A$1),B4,"")
C6=IF(AND($A$2=$A$1,$A$3=$A$1,$A$4=$A$1),C2,"")
C7=IF(AND($A$2=$A$1,$A$3=$A$1,$A$4=$A$1),C3,"")
C8=IF(AND($A$2=$A$1,$A$3=$A$1,$A$4=$A$1),C4,"")
D6=IF(AND($A$2=$A$1,$A$3=$A$1,$A$4=$A$1),D2,"")
D7=IF(AND($A$2=$A$1,$A$3=$A$1,$A$4=$A$1),D3,"")
D8=IF(AND($A$2=$A$1,$A$3=$A$1,$A$4=$A$1),D4,"")
E6=IF(AND($A$2=$A$1,$A$3=$A$1,$A$4=$A$1),E2,"")
E7=IF(AND($A$2=$A$1,$A$3=$A$1,$A$4=$A$1),E3,"")
E8=IF(AND($A$2=$A$1,$A$3=$A$1,$A$4=$A$1),E4,"")
F6=IF(AND($A$2=$A$1,$A$3=$A$1,$A$4=$A$1),F2,"")
F7=IF(AND($A$2=$A$1,$A$3=$A$1,$A$4=$A$1),F3,"")
F8=IF(AND($A$2=$A$1,$A$3=$A$1,$A$4=$A$1),F4,"")


If it is row by row then

Excel 2010
ABCDEF
12018
22018JanJanJanJanbob
320181/5/20181/12/20181/19/20181/26/20182/2/2018
4201812347
5
6JanJanJanJanbob
74310543112431194312643133
812347
Sheet4 (2)
Cell Formulas
RangeFormula
B6=IF($A2=$A$1,B2,"")
B7=IF($A3=$A$1,B3,"")
B8=IF($A4=$A$1,B4,"")
C6=IF($A2=$A$1,C2,"")
C7=IF($A3=$A$1,C3,"")
C8=IF($A4=$A$1,C4,"")
D6=IF($A2=$A$1,D2,"")
D7=IF($A3=$A$1,D3,"")
D8=IF($A4=$A$1,D4,"")
E6=IF($A2=$A$1,E2,"")
E7=IF($A3=$A$1,E3,"")
E8=IF($A4=$A$1,E4,"")
F6=IF($A2=$A$1,F2,"")
F7=IF($A3=$A$1,F3,"")
F8=IF($A4=$A$1,F4,"")
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

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