RCU61

New Member
Hello,
I would like to ask for your kind support in solving my not so easy problem.
Given
City A – City Z distance in miles (one way, by car)
City Z – City A distance in miles (the other way, bytrain)

For any given city pairs, find
1. If the A2Z has a counterpart Z2A

2. If there is one, then:
2.1 Enter the same unique identifier in KEY column for both A2Z and Z2A city pairs
2.2 If A2Z distance = Z2A distance, then do nothing
2.3 If A2Z distance > Z2A distance, enter A2Z minus Z2A miles delta into GREATER column for A2Z
2.4 If A2Z distance < Z2A distance, enterZ2A minus A2Z miles delta into GREATER column for Z2A <z2a font="" z2a<="" for="" column="" greater="" into="" delta="" miles="" a2z="" minus="" z2a="" enter="" distance,=""></z2a>

3. If there is none, then enter a unique identifier in KEY columnfor that city pair.

I tried IF/INDEX/MATCH but I got stuck

Example:
 City Pair Miles KEY GREATER A-B 45 1 27 A-C 15 2 A-D 25 3 A-E 40 4 B-A 18 1 8 C-A 32 2 17 D-A 25 3 B-C 67 5 B-D 23 6 B-E 123 7 C-B 80 5 13 D-B 23 6

<tbody>
</tbody>
<strike></strike>

<strike></strike><strike></strike>

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce

FDibbins

Well-known Member
Is this a homework assignment?

RCU61

New Member
Yes, indeed, FDibbins!

Replies
1
Views
1K
Replies
8
Views
186
Replies
8
Views
325
Replies
0
Views
207
Replies
8
Views
2K

1,171,458
Messages
5,875,630
Members
433,141
Latest member
Artky111

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.

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

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