Interesting - Reorder road segments in a corridor

user90

New Member
Joined
Jan 3, 2015
Messages
1
Please help me in writing the formula. Because of match first occurence it is getting repeated.

I have "From", "To" NODE IDs of road segments which are not in order and needs to be reordered. I found the two unique values which are first node and last node of the corridor and started with one.

D2=E2
E3 =IF(INDEX($B$3:$C$33,IFERROR(MATCH($D3,$B$3:$B$33,0),MATCH($D3,$C$3:$C$33,0)),1)=D3,INDEX($B$3:$C$33,IFERROR(MATCH($D3,$B$3:$B$33,0),MATCH($D3,$C$3:C33,0)),2),INDEX($B$3:$C$33,IFERROR(MATCH($D3,$B$3:$B$33,0),MATCH($D3,$C$3:$C$33,0)),1))

SlNoFromToReorder FromReorder ToRow Occurrence
11000283291361000283291361
210019232914932913610019610
31001923291821001963290279
410019310055832902732913727
510019332914732913732801125
610019410042532801132913725
710019432918932913732801125
810019532905932801132913725
910019532913932913732801125
1010019632902732801132913725
1110019632913632913732801125
1210042532914432801132913725
1310055810064632913732801125
1410061810061932801132913725
1510061810065632913732801125
1610061910062032801132913725
1710062010062132913732801125
1810062132501332801132913725
1910064632918932913732801125
2010065432501232801132913725
2110065432918532913732801125
2210065510065632801132913725
2310065532918632913732801125
2432000132501332801132913725
2532501232918632913732801125
2632801132913732801132913725
2732801132913932913732801125
2832902732913732801132913725
2932905932914332913732801125
3032914332914432801132913725
3132914732914932913732801125
3232918232918532801132913725

<tbody>
</tbody>

Thank you very much in advance.
 
Last edited:

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.

Forum statistics

Threads
1,215,548
Messages
6,125,468
Members
449,230
Latest member
ASBeard

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