Custom number formatting

MiniFav

Board Regular
Joined
Mar 10, 2020
Messages
81
Office Version
  1. 365
Platform
  1. Windows
I understand you can highlight text using the custom number formatting.
I am looking to display a number of hours followed by minutes. I have tried [H]:MM but this seems to be limited by a length which i will exceed.

so I have reverted to using decimals. However this allows the the two decimal spaces to go above 59, so i would like a highlight to grab my attention when a value gets entered which exceeds this. Eg. 123456.78 would be highlighted where 123456.55 would be fine.

I have tried conditional formatting but with the size of the spreadsheet i am getting a lot of slow down every time i enter values.

I understand how to implement VBA code so I am open to this if the number formatting route is not the best way to go.

Any suggestions would be great.
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
what sort of hours are you looking for ?
 
Upvote 0
max hours could be HHHHHHHH:MM for example but could also be as low as 00:00
 
Upvote 0
Have you given this a try?

VBA Code:
ActiveCell.NumberFormat = "##"":""##"":""##"":""##"
 
Upvote 0

Forum statistics

Threads
1,214,919
Messages
6,122,259
Members
449,075
Latest member
staticfluids

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