requesting for the vba program for finding all possible paths between any two nodes in a bi-directional route map. inpit is given in sheet 1 as a=from; B=to; C=distance, d= time; e= fare.
output is given in sheet 2 as
A1=from ....;
B1= to ....;
A2= possible path1; B2 = DISTANCE C2= TIME TAKEN D2 = TOTAL FARE
A3 = possible path 2; B3 = DISTANCE C3= TIME TAKEN D3 = TOTAL FARE
A4=possible path 3; B4 = DISTANCE C4= TIME TAKEN D4 = TOTAL FARE
A5=possible path 4; B5 = DISTANCE C5= TIME TAKEN D5 = TOTAL FARE
A6=possible path 5; B6 = DISTANCE C6= TIME TAKEN D6 = TOTAL FARE
AS DATA
[TABLE="width: 271"]
<colgroup><col><col><col><col><col><col></colgroup><tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]FROM[/TD]
[TD]TO[/TD]
[TD]DISTANCE[/TD]
[TD]TIME[/TD]
[TD]AMOUNT[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]200[/TD]
[TD]00:02:30[/TD]
[TD]11[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]195[/TD]
[TD]00:03:30[/TD]
[TD]12[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]210[/TD]
[TD]00:04:30[/TD]
[TD]13[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]180[/TD]
[TD]00:05:30[/TD]
[TD]14[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]E[/TD]
[TD]F[/TD]
[TD]245[/TD]
[TD]00:06:30[/TD]
[TD]15[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]F[/TD]
[TD]G[/TD]
[TD]230[/TD]
[TD]00:07:30[/TD]
[TD]16[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]C[/TD]
[TD]G[/TD]
[TD]215[/TD]
[TD]00:08:30[/TD]
[TD]17[/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]F[/TD]
[TD]H[/TD]
[TD]150[/TD]
[TD]00:09:30[/TD]
[TD]18[/TD]
[/TR]
</tbody>[/TABLE]
Input
FROM B
TO H
SOLVE WITH NEW
OUTPUT
[TABLE="width: 759"]
<colgroup><col width="69" span="11" style="width:52pt"> </colgroup><tbody>[TR]
[TD="class: xl65, width: 69"]from[/TD]
[TD="class: xl65, width: 69"]to[/TD]
[TD="class: xl65, width: 69"][/TD]
[TD="class: xl65, width: 69"][/TD]
[TD="class: xl65, width: 69"][/TD]
[TD="class: xl65, width: 69"][/TD]
[TD="class: xl65, width: 69"][/TD]
[TD="class: xl65, width: 69"][/TD]
[TD="class: xl65, width: 69"]DISTANCE[/TD]
[TD="class: xl65, width: 69"] TIME[/TD]
[TD="class: xl65, width: 69"] AMOUNT[/TD]
[/TR]
[TR]
[TD="class: xl65"]B[/TD]
[TD="class: xl65"]H[/TD]
[TD="class: xl66"]B[/TD]
[TD="class: xl66"]C[/TD]
[TD="class: xl66"]D[/TD]
[TD="class: xl66"]E[/TD]
[TD="class: xl66"]F[/TD]
[TD="class: xl66"]H[/TD]
[TD="class: xl66"]980[/TD]
[TD="class: xl67"]00:29:30[/TD]
[TD="class: xl68"] 72[/TD]
[/TR]
[TR]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl66"]B[/TD]
[TD="class: xl66"]C[/TD]
[TD="class: xl66"]G[/TD]
[TD="class: xl66"]F[/TD]
[TD="class: xl66"]H[/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"]790[/TD]
[TD="class: xl67"]00:29:00[/TD]
[TD="class: xl68"] 63[/TD]
[/TR]
</tbody>[/TABLE]
output is given in sheet 2 as
A1=from ....;
B1= to ....;
A2= possible path1; B2 = DISTANCE C2= TIME TAKEN D2 = TOTAL FARE
A3 = possible path 2; B3 = DISTANCE C3= TIME TAKEN D3 = TOTAL FARE
A4=possible path 3; B4 = DISTANCE C4= TIME TAKEN D4 = TOTAL FARE
A5=possible path 4; B5 = DISTANCE C5= TIME TAKEN D5 = TOTAL FARE
A6=possible path 5; B6 = DISTANCE C6= TIME TAKEN D6 = TOTAL FARE
AS DATA
[TABLE="width: 271"]
<colgroup><col><col><col><col><col><col></colgroup><tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]FROM[/TD]
[TD]TO[/TD]
[TD]DISTANCE[/TD]
[TD]TIME[/TD]
[TD]AMOUNT[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]200[/TD]
[TD]00:02:30[/TD]
[TD]11[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]195[/TD]
[TD]00:03:30[/TD]
[TD]12[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]210[/TD]
[TD]00:04:30[/TD]
[TD]13[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]180[/TD]
[TD]00:05:30[/TD]
[TD]14[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]E[/TD]
[TD]F[/TD]
[TD]245[/TD]
[TD]00:06:30[/TD]
[TD]15[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]F[/TD]
[TD]G[/TD]
[TD]230[/TD]
[TD]00:07:30[/TD]
[TD]16[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]C[/TD]
[TD]G[/TD]
[TD]215[/TD]
[TD]00:08:30[/TD]
[TD]17[/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]F[/TD]
[TD]H[/TD]
[TD]150[/TD]
[TD]00:09:30[/TD]
[TD]18[/TD]
[/TR]
</tbody>[/TABLE]
Input
FROM B
TO H
SOLVE WITH NEW
OUTPUT
[TABLE="width: 759"]
<colgroup><col width="69" span="11" style="width:52pt"> </colgroup><tbody>[TR]
[TD="class: xl65, width: 69"]from[/TD]
[TD="class: xl65, width: 69"]to[/TD]
[TD="class: xl65, width: 69"][/TD]
[TD="class: xl65, width: 69"][/TD]
[TD="class: xl65, width: 69"][/TD]
[TD="class: xl65, width: 69"][/TD]
[TD="class: xl65, width: 69"][/TD]
[TD="class: xl65, width: 69"][/TD]
[TD="class: xl65, width: 69"]DISTANCE[/TD]
[TD="class: xl65, width: 69"] TIME[/TD]
[TD="class: xl65, width: 69"] AMOUNT[/TD]
[/TR]
[TR]
[TD="class: xl65"]B[/TD]
[TD="class: xl65"]H[/TD]
[TD="class: xl66"]B[/TD]
[TD="class: xl66"]C[/TD]
[TD="class: xl66"]D[/TD]
[TD="class: xl66"]E[/TD]
[TD="class: xl66"]F[/TD]
[TD="class: xl66"]H[/TD]
[TD="class: xl66"]980[/TD]
[TD="class: xl67"]00:29:30[/TD]
[TD="class: xl68"] 72[/TD]
[/TR]
[TR]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl66"]B[/TD]
[TD="class: xl66"]C[/TD]
[TD="class: xl66"]G[/TD]
[TD="class: xl66"]F[/TD]
[TD="class: xl66"]H[/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"]790[/TD]
[TD="class: xl67"]00:29:00[/TD]
[TD="class: xl68"] 63[/TD]
[/TR]
</tbody>[/TABLE]