Hello!

I need a formula/function that can help me show as many decimals needed (0s) until it changes to anything but a 0 and show 2 decimals after that.

Examples:

0.0008456 = 0.00084
0.026584 = 0.026
0.15 = 0.15
0.000001 = 0.000001

I tried different custom formats but so far I've had no luck getting the right one.
Thought of using an IF formula to check every individual decimal, I don't know if that's even possible.

Anything helps! thank you!