if condition matches then copy till next match to new sheet under match

IMNEWTOEXCEL

New Member
Joined
Apr 26, 2018
Messages
5
Hi Excel Gurus,

below is sample data i have on column A on sheet1, on sheet2 i have headings based on interfaces from below, if there is a match then copy ip address and ipv6 address line to matched column on sheet2. this needs to be looped until the end when blank cell. There might be different number of ip or ipv6 address under the interface that is why i need to get it done this way.

[TABLE="width: 339"]
<tbody>[TR]
[TD]interface TenGigabitEthernet0/0/0.110[/TD]
[/TR]
[TR]
[TD]ip address 1.1.1.1 255.255.255.252[/TD]
[/TR]
[TR]
[TD]ipv6 address 1970:1:0:1::2/64[/TD]
[/TR]
[TR]
[TD]interface TenGigabitEthernet0/0/1.111[/TD]
[/TR]
[TR]
[TD]ip address 2.2.2.2 255.255.255.252[/TD]
[/TR]
[TR]
[TD]ipv6 address 1971:1:0:1::2/64[/TD]
[/TR]
[TR]
[TD]interface TenGigabitEthernet0/1/0.210[/TD]
[/TR]
[TR]
[TD]ip address 3.3.3.3 255.255.255.252[/TD]
[/TR]
[TR]
[TD]ipv6 address 1972:1:0:1::2/64[/TD]
[/TR]
[TR]
[TD]interface TenGigabitEthernet0/1/1.211[/TD]
[/TR]
[TR]
[TD]ip address 4.4.4.4 255.255.255.252[/TD]
[/TR]
[TR]
[TD]ipv6 address 1973:1:0:1::2/64[/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
[TR]
[TD]interface Bundle1.11[/TD]
[/TR]
[TR]
[TD]ip address 5.5.5.5 255.255.255.252[/TD]
[/TR]
[TR]
[TD]interface Bundle1.110[/TD]
[/TR]
[TR]
[TD]ip address 6.6.6.6 255.255.240.0 secondary[/TD]
[/TR]
[TR]
[TD]ip address 7.7.7.7 255.255.240.0 secondary[/TD]
[/TR]
[TR]
[TD]ip address 8.8.8.8 255.255.255.128 secondary[/TD]
[/TR]
[TR]
[TD]ip address 9.9.9.9 255.255.255.128 secondary[/TD]
[/TR]
[TR]
[TD]ip address 10.1.1.1 255.255.255.192 secondary[/TD]
[/TR]
[TR]
[TD]ip address 10.2.2.2 255.255.255.192 secondary[/TD]
[/TR]
[TR]
[TD]ip address 10.3.3.3 255.255.255.128 secondary[/TD]
[/TR]
[TR]
[TD]ip address 10.4.4.4 255.255.192.0[/TD]
[/TR]
[TR]
[TD]ipv6 address 1974:1:0:1::2/64[/TD]
[/TR]
[TR]
[TD]interface Bundle1.12[/TD]
[/TR]
[TR]
[TD]ip address 6.6.6.6 255.255.240.0 secondary[/TD]
[/TR]
[TR]
[TD]ip address 7.7.7.7 255.255.240.0 secondary[/TD]
[/TR]
[TR]
[TD]ip address 10.4.4.4 255.255.192.0[/TD]
[/TR]
[TR]
[TD]interface Bundle1.33[/TD]
[/TR]
[TR]
[TD]ip address 7.7.7.7 255.255.240.0 secondary[/TD]
[/TR]
[TR]
[TD]ip address 10.4.4.4 255.255.192.0[/TD]
[/TR]
[TR]
[TD]interface Bundle1.9000[/TD]
[/TR]
[TR]
[TD]ip address 7.7.7.7 255.255.240.0 secondary[/TD]
[/TR]
[TR]
[TD]ip address 10.4.4.4 255.255.192.0[/TD]
[/TR]
</tbody>[/TABLE]


Thanks
imnewtoexcel
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).

Forum statistics

Threads
1,224,922
Messages
6,181,783
Members
453,065
Latest member
jfrsanders

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