Understand the logic behind a table contains MAX in a range and a calculation

petrovit

New Member
Joined
Oct 30, 2022
Messages
4
Office Version
  1. 365
  2. 2021
Hi Guys,

Could you please assist me with the below logic?

I have the below table:

ABCDEF
2022-08-02 09:06:031111@yahoo.de
1000​
EURcredit_cardDeclined
2022-08-02 09:31:061111@yahoo.de
3000​
EURcredit_cardDeclined
2022-08-02 09:36:031111@yahoo.de
1000​
EURcredit_cardCompleted
2022-08-02 09:39:501111@yahoo.de
1000​
EURcredit_cardDeclined

I would like to have the logic of:

if a user (email) received a decline what is the amount that I have lost?

In this case, we have user 1111@yahoo.de that completed 1000EUR transaction but tried the highest amount of 3000EUR, so we have lost 2000EU.

I want to take the highest amount that we have tried and to know how much we succeeded minos declined which will give me how much EUR I have lost.





I am taking the MAX.

For example, in here I wanted to charge the client only total 3K, but in reality couldn't (only 1K confirmed) so this is the reason for lost of 2K.
All the trails are not should take into consideration, only the MAX amount.


Why is 2000 the correct answer when two different 1000 were declined? Because the bid was on the MAX amount all the rest are trials to try to reach the MAX.

How can I do so?
I have several clients which I would like to have a formula on all of them.

Many thanks
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Welcome to the MrExcel board!

Is this what you are trying to do?

22 10 30.xlsm
ABCDEFGHI
12/08/2022 9:061111@yahoo.de1000EURcredit_cardDeclined1111@yahoo.de2000
22/08/2022 9:311111@yahoo.de3000EURcredit_cardDeclined
32/08/2022 9:361111@yahoo.de1000EURcredit_cardCompleted
42/08/2022 9:391111@yahoo.de1000EURcredit_cardDeclined
Lost
Cell Formulas
RangeFormula
I1I1=MAXIFS(C$1:C$4,B$1:B$4,H1,F$1:F$4,"Declined")-MAXIFS(C$1:C$4,B$1:B$4,H1,F$1:F$4,"Completed")
 
Upvote 0
You're welcome. Thanks for the follow-up. (y)
 
Upvote 0
I can see that if there is an only declines:

ABCDEF
2022-08-02 09:06:031111@yahoo.de1000EURcredit_cardDeclined
2022-08-02 09:31:061111@yahoo.de3000EURcredit_cardDeclined
2022-08-02 09:36:031111@yahoo.de1000EURcredit_cardDeclined
2022-08-02 09:39:501111@yahoo.de1000EURcredit_cardDeclined

The same function
=MAXIFS(C$1:C$4,B$1:B$4,H1,F$1:F$4,"Declined")-MAXIFS(C$1:C$4,B$1:B$4,H1,F$1:F$4,"Completed")
Will extract the results 3000-1000=2000, which is an incorrect as no transactions went through and the results should be 3000. How to do so?
 
Upvote 0
I can see that if there is an only declines:

ABCDEF
2022-08-02 09:06:031111@yahoo.de1000EURcredit_cardDeclined
2022-08-02 09:31:061111@yahoo.de3000EURcredit_cardDeclined
2022-08-02 09:36:031111@yahoo.de1000EURcredit_cardDeclined
2022-08-02 09:39:501111@yahoo.de1000EURcredit_cardDeclined

The same function
=MAXIFS(C$1:C$4,B$1:B$4,H1,F$1:F$4,"Declined")-MAXIFS(C$1:C$4,B$1:B$4,H1,F$1:F$4,"Completed")
Will extract the results 3000-1000=2000, which is an incorrect as no transactions went through and the results should be 3000. How to do so?
My mistake. it will give you 3000. Thanks
 
Upvote 0

Forum statistics

Threads
1,214,833
Messages
6,121,868
Members
449,053
Latest member
Mesh

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