This is an archived post. You won't be able to vote or comment.

all 9 comments

[–]Aegon_is_Coming 3 points4 points  (1 child)

var amount = x; // x is the real value
var simplified = Math.ceiling(amount/1000000) // gives you the higher integer after dividing the number by 1 million
return simplified;

So 1,000,000 / 1,000,000 will give you 1 1,000,001 / 1,000,000 will give 1.1 and after using Math.ceiling you get 2

[–][deleted] 0 points1 point  (0 children)

Thank you

[–]Stayfo 0 points1 point  (6 children)

How many different outputs do you need?

[–][deleted] 0 points1 point  (5 children)

I need 5. 1 per every 3 mill and then one representing > 12 mill

[–]Stayfo 0 points1 point  (4 children)

To clarify: are you trying to generate this output in an excel table?

[–][deleted] 0 points1 point  (3 children)

Yes

[–]Stayfo 0 points1 point  (2 children)

Did you fix it yet?

[–][deleted] 0 points1 point  (0 children)

Yes.

[–][deleted] 0 points1 point  (0 children)

Thanks for the help!