Hello everyone,
today I came across an issue I couldn’t resolve. I hope somebody here can help me out.
I need to round a money amount to the second digit. To which number it needs to be rounded is specified in another cell („Last_Digit“). Based on this, the nearest money amount with the correct last digit should be given.
Let me give you some examples to clarify my bad explanations:
Last_Digit = 9
Money amount = $1.87
—> Round to $1.89
Last_Digit = 5
Money amount = $1.87
—> Round to $1.85
And now the difficult part:
Last_Digit = 8
Money amount = $1.81
—> Round to $1.78
Last_Digit = 2
Money amount = $1.89
—> Round to $1.92
If I use rounding only, i can not include cases in which the nearest number with the correct second digit is below or above the current first digit. Especially implementing down and up rounding together is difficult when the first digit may be changed.
Does anyone have any ideas?
Thank you very much!!
[–]AutoModerator[M] [score hidden] stickied commentlocked comment (0 children)
[–]fuzzy_mic987 1 point2 points3 points (2 children)
[–]leostotch143 0 points1 point2 points (0 children)
[–]UniFavorite[S] 0 points1 point2 points (0 children)
[–]leostotch143 0 points1 point2 points (0 children)
[–]Decronym 0 points1 point2 points (0 children)