Custom number formatting

MiniFav

New Member
Joined
Mar 10, 2020
Messages
14
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.
 

Some videos you may like

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).

mole999

Moderator
Joined
Oct 23, 2004
Messages
10,524
Office Version
  1. 2019
  2. 2016
  3. 2013
Platform
  1. Windows
what sort of hours are you looking for ?
 

MiniFav

New Member
Joined
Mar 10, 2020
Messages
14
Office Version
  1. 365
Platform
  1. Windows
max hours could be HHHHHHHH:MM for example but could also be as low as 00:00
 

Ricky918

New Member
Joined
Mar 10, 2020
Messages
3
Office Version
  1. 2019
Platform
  1. Windows
Have you given this a try?

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

Watch MrExcel Video

Forum statistics

Threads
1,123,456
Messages
5,601,772
Members
414,472
Latest member
Chris_1990

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
Top