Setting Up Threshold Limit Excel Formula

andersen_yunan

New Member
Joined
Feb 7, 2018
Messages
36
Hi All, currently I have problem to solve this issue regarding setting up formula for case below.
As you can see, I have a payment threshold of $1500, while the original data that I have is only the column #number & #payment made. I want to have a formula that can generate the value in column #payment limit & #payment excess, which the total of payment limit should not exceed given payment threshold for each number.

Is there any excel formula that can solve this?

Thanks in advance!

Payment Threshold: 1500
NumberPayment MadePayment LimitPayment Excess
A100010000
A20005001500
A150015000
B20001500500
C300015001500
D22001500700
E400400400
E12001100100

<colgroup><col><col><col span="2"></colgroup><tbody>
</tbody>
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Sorry, the table should look like this.

NumberPayment MadePayment LimitPayment Excess
A100010000
A20005001500
A150001500
B20001500500
C300015001500
D22001500700
E400400400
E12001100100

<tbody>
</tbody>
 
Last edited:
Upvote 0
Hi Fazza,

I tried to run your formula in my sheet, however it takes so much time >40 minutes since I have around 200k rows.

Is there any way I can make this faster? I was thinking of VBA but it doesn't help with copy and paste value only resulted in copy of value results in first cell only instead of all.
Thanks in advance!
 
Upvote 0
yes, more than 40 minutes is too long
the proposed formulas are simple & should be adequately quick
likely it is something other than these formulas

does the spreadsheet purely have data values in two columns?

or,
are there any other formulas in the spreadsheet?
or conditional format?
or VBA?
or other obvious slow points?
 
Upvote 0
so I tested this on my work laptop : it is a few years old

200,000 records was too much for it to calculate!

so i tried just putting the first formula halfway down - 100,000 cells.
100,000 records in column C only took about 2 to 3 minutes.
then pasted this to values only, took another couple of minutes.

on that basis, it would take another similar ~5 minutes to do the second 100,000 formulas, column C only. pasted to values.
so column C for 200,000 records in 10 minutes
then I'm guessing a lesser duration to do the simple subtraction in column D. I didn't do this step
This suggests whole exercise would take close to 20 minutes.

still seems too slow to me

maybe you'll find it quicker on a newer computer (that is, doing one column at a time, and half the records at a time. Given your computer can do the 200,000 records at all, it is sure to be faster than my oldish work computer)
Or changing the column C formula to a couple of steps using a helper column instead of in the single column. this is likely the best you can do with formulas
 
Upvote 0
so I tested this on my work laptop : it is a few years old

200,000 records was too much for it to calculate!

so i tried just putting the first formula halfway down - 100,000 cells.
100,000 records in column C only took about 2 to 3 minutes.
then pasted this to values only, took another couple of minutes.

on that basis, it would take another similar ~5 minutes to do the second 100,000 formulas, column C only. pasted to values.
so column C for 200,000 records in 10 minutes
then I'm guessing a lesser duration to do the simple subtraction in column D. I didn't do this step
This suggests whole exercise would take close to 20 minutes.

still seems too slow to me

maybe you'll find it quicker on a newer computer (that is, doing one column at a time, and half the records at a time. Given your computer can do the 200,000 records at all, it is sure to be faster than my oldish work computer)
Or changing the column C formula to a couple of steps using a helper column instead of in the single column. this is likely the best you can do with formulas


Hi Fazza, Thanks for the input!
Will try this approach. At first, I though VBA could solve this but it's still stuck in the calculation part as well.
 
Upvote 0

Forum statistics

Threads
1,214,641
Messages
6,120,693
Members
448,979
Latest member
DET4492

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