Max Drawdown by ID and Transaction

Autonomous

New Member
Joined
Apr 30, 2019
Messages
5
I have a worksheet with IDs in column A, Transactions in Column B, Balance by ID in Column C and Date in Column D. I need to calculate Drawdown in Column E per ID for each transaction in order. Your help would be greatly appreciated!

The problem is the formula below only works for one ID at a time. I need a formula that will group transactions by each ID and display the Drawdown calculation in column E.

<code>Below is formula and example of Drawdown output in Column E but I need output for each ID and associated transaction to display in column E so the following formula needs to be altered. There are literally hundreds of IDs so it is not feasible to nest IF statements per ID.

=IF($A$2:A2=A2,C2/MAX(IF($A$2:A2=A2,$C$2:C2))-1,"")


</code>
[TABLE="class: grid, width: 500, align: left"]
<tbody>[TR]
[TD][/TD]
[TD]A
[/TD]
[TD]B
[/TD]
[TD]C
[/TD]
[TD]D
[/TD]
[TD]E
[/TD]
[TD]F
[/TD]
[/TR]
[TR]
[TD]1
[/TD]
[TD]ID
[/TD]
[TD]Transaction
[/TD]
[TD]Balance by ID
[/TD]
[TD]Date
[/TD]
[TD]Drawdown
[/TD]
[TD]Max Drawdown
[/TD]
[/TR]
[TR]
[TD]2
[/TD]
[TD]1001
[/TD]
[TD="align: right"]75.00
[/TD]
[TD="align: right"]75.00
[/TD]
[TD="align: right"]1/1/2019
[/TD]
[TD="align: right"]0
[/TD]
[TD="align: right"][/TD]
[/TR]
[TR]
[TD]3
[/TD]
[TD]1001
[/TD]
[TD="align: right"]-27.00
[/TD]
[TD="align: right"]48.00
[/TD]
[TD="align: right"]1/2/2019
[/TD]
[TD="align: right"]-0.36
[/TD]
[TD="align: right"][/TD]
[/TR]
[TR]
[TD]4
[/TD]
[TD]1002
[/TD]
[TD="align: right"]35.00
[/TD]
[TD="align: right"]35.00
[/TD]
[TD="align: right"]1/1/2019
[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[/TR]
[TR]
[TD]5
[/TD]
[TD]1003
[/TD]
[TD="align: right"]18.00
[/TD]
[TD="align: right"]18.00
[/TD]
[TD="align: right"]1/1/2019[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[/TR]
[TR]
[TD]6
[/TD]
[TD]1002
[/TD]
[TD="align: right"]12.10
[/TD]
[TD="align: right"]47.10
[/TD]
[TD="align: right"]1/2/2019
[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[/TR]
[TR]
[TD]7
[/TD]
[TD]1001
[/TD]
[TD="align: right"]-3.00
[/TD]
[TD="align: right"]45.00
[/TD]
[TD="align: right"]1/2/2019
[/TD]
[TD="align: right"]-0.4
[/TD]
[TD="align: right"][/TD]
[/TR]
[TR]
[TD]8
[/TD]
[TD]1004
[/TD]
[TD="align: right"]15.00
[/TD]
[TD="align: right"]15.00
[/TD]
[TD="align: right"]1/3/2019
[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[/TR]
[TR]
[TD]9
[/TD]
[TD]1003
[/TD]
[TD="align: right"]-20.00
[/TD]
[TD="align: right"]-2.00
[/TD]
[TD="align: right"]1/1/2019
[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[/TR]
[TR]
[TD]10
[/TD]
[TD]1003
[/TD]
[TD="align: right"]-6.00
[/TD]
[TD="align: right"]-8.00
[/TD]
[TD="align: right"]1/2/2019
[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[/TR]
[TR]
[TD]11
[/TD]
[TD]1004
[/TD]
[TD="align: right"]16.00
[/TD]
[TD="align: right"]31.00
[/TD]
[TD="align: right"]1/4/2019
[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[/TR]
[TR]
[TD]12
[/TD]
[TD]1002
[/TD]
[TD="align: right"]-5.00
[/TD]
[TD="align: right"]42.10
[/TD]
[TD="align: right"]1/3/2019
[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.

Forum statistics

Threads
1,224,819
Messages
6,181,153
Members
453,021
Latest member
Justyna P

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