Using MatchIndex on Multiple results to return value for the first result

Lres81715

Board Regular
Joined
Aug 26, 2015
Messages
147
I have a project where 60K records from the original worksheet have duplicate client # numbers. As in, the client placed multiple orders using the same client project key but we supplied different transaction ID's.

The client has asked for report showing the difference in MARKET price, difference in time it took to complete the order, did the transaction have different employees working on it (as in some employees searched the market price for a better deal for the client).
I need a basic formula to help me process each of these requests. A single formula that I can adapt it to meet the needs of each request. I know what needs to be done, just don't know how to start

Example
Client #Transaction #Employee #Transaction ValueTime to complete order
3505000819117130797 12800012
3505000806127130797 13200015
4075000870212117615 3600043
4075000839178117615 4600017
4415000869157132204 2950006
4415000826105132204 305,0007
4595000896841131101 195,0007
4595000894834131101 19500012
6415000893493114280 26500032
6415000858570132347 175,00024

<colgroup><col><col><col><col><col></colgroup><tbody>
</tbody>
373250008944161152815
373250008531631152812600009
3732500081521211528125000023

<colgroup><col><col><col><col><col></colgroup><tbody>
</tbody>

So for Client #350, employee was the same [True], Transaction Value was [-4000], Transaction % was [3%], Time to complete difference was [-3], TTC percentage was [-25%]

Special note, The client # can be 2, 3, 4, 5 times. So the information should appear on all ROWS but the MIN Transaction ID. So in the case of Client # 3732, the information should appear on Transaction # 5000894416 AND 5000853163 but 50815212 would remain blank.
So it would look like this

Client #Transaction #Employee #Transaction ValueTime to complete orderSame Employee?Trans Value DifferencePercentageTime to Complete DiffTTC Percentage
373250008944161152815 TRUE-260000#DIV/0!-4-80%
37325000853163115281 2600009 TRUE100004%-14-156%
37325000815212115281 25000023

<colgroup><col><col><col><col><col><col><col><col><col><col></colgroup><tbody>
</tbody>


I've included a partial sheet to try the formula on.

https://app.box.com/s/tinglvb91u2dlristrsamrbzzw8vr8ji
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Take Same Employee as an example:

Try the formula below for a cell at row 13 under Same Employee column:

=IFERROR(IF(INDEX(C14:$C$60000,MATCH(A13,A14:$A$60000,0))=C13,TRUE,FALSE),"")

The idea is to find the next entry with the same client ID (from Row 14 to end of your total entries)
 
Upvote 0
Take Same Employee as an example:

Try the formula below for a cell at row 13 under Same Employee column:

=IFERROR(IF(INDEX(C14:$C$60000,MATCH(A13,A14:$A$60000,0))=C13,TRUE,FALSE),"")

The idea is to find the next entry with the same client ID (from Row 14 to end of your total entries)


Hmmm, let me try this and get back to you. This might just work for all instances. Thanks in advance!
 
Upvote 0
Thanks Little Excel!
This ended up working like a charm. I just modified it for each column I needed. Sum instead of If, Average, CountIf and SumIf all worked perfectly.
 
Upvote 0

Forum statistics

Threads
1,214,784
Messages
6,121,540
Members
449,038
Latest member
Guest1337

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