Formula or vba code to calculate the values between two numbers with criteria

asyamonique

Well-known Member
Joined
Jan 29, 2008
Messages
1,280
Office Version
  1. 2013
Platform
  1. Windows
POINTSTICKETS
7,03017
6,71116
4,70914
3,65113
2,99012
2,97012
2,58012
8008
3003

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



Good Day,
I would like to ask you in regards the given table above which I like to get the result when it comes to calculate promo ticket amounts depands on the points the customers earned.
Calculation simply will be like that:
If they have 100 to 1000point they will earn 10 tickets.
ıf above 1000 then every 1000 will be additionaly 1 ticket.

Many Thanks
 
Last edited:

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
If they have 100 to 1000point they will earn 10 tickets.
ıf above 1000 then every 1000 will be additionaly 1 ticket.

Based on your sample answers, it seems you want 1 ticket for every 100 points, up to 1000 point/10 tickets?
 
Upvote 0
Assuming a "yes" for my question above, it also looks to me like you have added 1 extra point for those over 1000?
7,030 17
6,711 16
4,709 14
Based on those...
7030 -1000 = 6030, so that would be 10 + 6?
UNLESS it is 1000 points or part-thereof?

This formula works for adding a ticket for every full 1000
=IF(A1<=1000,INT(A1/100),10+INT((A1-1000)/1000))
 
Upvote 0
Hi,
Is it possible to add more function including 10.000 and folds, into that formula like below?
Between 100 to 1000 = 10 tickets
Every 1.000 = 1 ticket
Every 10.0000 = 1 ticket

Sample:
900point = No ticket
1500point = 10 ticket
7400 points= 16tickets
35000 points= 17tickets

Thanks
 
Upvote 0
Correction,
Sorry!
900point = 9 tickets
1500point = 15 tickets
7400 points= 20 tickets
35000 points= 44 tickets
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,235
Messages
6,123,789
Members
449,126
Latest member
Greeshma Ravi

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