TheMadTree

New Member
Joined
Mar 23, 2015
Messages
25
Good afternoon,

I was wondering if there's any way to conditionally format a cell to display two decimals only if the value in that cell has decimals?

Any input would be greatly appreciated!

Thank you,

Elias
 
Last edited:

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Using the "with a formula" method, you could try, for example.

=A1<>INT(A1)
 
Upvote 0
hello,

The way to do it which I know is through VBA. How? Check if third character from right is "." if so then copy first two characters from right.
I would use "RIGHT" function.

Please attach the file with data so I can write a code for it

Kind Regards
Tommeck37
 
Upvote 0
Good afternoon,

Thank you for your quick answer! I have ran a quick test and this solves my issue!

Have a nice day!

Elias
 
Upvote 0

Forum statistics

Threads
1,214,589
Messages
6,120,416
Members
448,960
Latest member
AKSMITH

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