Discussion:
Format number
(too old to reply)
n***@gmail.com
2020-04-30 11:21:34 UTC
Permalink
Hi
I have a value field, which contains the values 10000,3500,1500 & 500 for example. I need a query to format this value to display the results 10k, 3.5k, 1.5k and 0.5k

Can anyone help please?

Thank you
Ulrich Möller
2020-04-30 12:15:54 UTC
Permalink
Post by n***@gmail.com
I have a value field, which contains the values 10000,3500,1500 & 500 for example. I need a query to format this value to display the results 10k, 3.5k, 1.5k and 0.5k
What about a calculated field: CStr([Value/1000) & " k"

Ulrich
n***@gmail.com
2020-04-30 12:55:30 UTC
Permalink
Thank you, a good start! But how do I round the result to 1 decimal place in the same formula?

Thanks again
Ulrich Möller
2020-04-30 17:16:05 UTC
Permalink
Hi,
Post by n***@gmail.com
Thank you, a good start! But how do I round the result to 1 decimal place in the same formula?
for Banker's Rounding the function VBA.Round() can be used, otherwise
look here:
http://www.vb-helper.com/howto_round_to_specified_digits.html

Ulrich

Loading...