Time Conditional Formatting Help

%3CLINGO-SUB%20id%3D%22lingo-sub-1685787%22%20slang%3D%22en-US%22%3ETime%20Conditional%20Formatting%20Help%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1685787%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Excel%20folks%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20stuck%20on%20how%20to%20get%20a%20conditional%20formatting%20for%20time%20to%20work.%20I've%20tried%20MANY%20different%20iterations%20and%20it's%20not%20working.%20One%20of%20them%20seemed%20to%20highlight%20part%20of%20what%20I%20wanted%20but%20it%20still%20wasn't%20correct.%20Once%20I%20changed%20it%20just%20slightly%2C%20it%20completely%20broke%20and%20highlighted%20everything.%20Any%20help%20would%20be%20appreciated!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20trying%20to%20write%20a%20conditional%20formatting%20formula%20that%20says%20anything%20in%20column%20M%20that%20is%20greater%20than%2015%20minutes%2C%20(0%2C15%2C1)%20should%20be%20highlighted.%20I've%20tried%20using%20the%20%22Format%20all%20cells%20based%20on%20their%20values%22%20and%20set%20one%20for%20%3CTIME%3ETIME(0%2C15%2C1)%20but%20that%20doesn't%20do%20anything%20at%20all.%20Same%20thing%20with%26nbsp%3B%3D%22TIME(0%2C15%2C1)%22%20and%26nbsp%3B%3D%22TIME(23%2C59%2C59)%22%20for%20min%2Fmax%20values%3C%2FTIME%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI've%20also%20tried%26nbsp%3B%3CSPAN%3E%3DTEXT(%24B%241%2C%22hh%3Amm%3Ass%22)%26gt%3B%2200%3A15%3A00%22%20but%20that%20highlighted%20everything%20in%20the%20entire%20column.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EI've%20tried%20using%20the%20one%20below%20but%20that%20too%20doesn't%20work%2C%20it%20highlights%20random%20things%20but%20not%20what%20I%20want.%3C%2FSPAN%3E%3C%2FP%3E%3CPRE%3E%3D(M2%2B0%20%26gt%3B%20TIME(0%2C15%2C0))%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EI%20tried%20formatting%20column%20M%20as%20time%20hh%3Amm%3Ass%20in%20cell%20format%2C%20with%20no%20real%20difference.%20I%20then%20tried%20formatting%20it%20as%20text%2C%20and%20same%2C%20no%20difference.%20I%20don't%20mind%20if%20I%20get%20a%20negative%20value%2C%20represented%20by%20%23VALUE!%20since%20I%20can%20filter%20those%20out.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EColum%20K%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20Column%20L%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20Column%20M%3C%2FP%3E%3CTABLE%20width%3D%22498%22%3E%3CTBODY%3E%3CTR%3E%3CTD%20width%3D%22158%22%3E3%3A00%3A00%20PM%3C%2FTD%3E%3CTD%20width%3D%2281%22%3E4%3A01%3A43%20PM%3C%2FTD%3E%3CTD%20width%3D%22259%22%3E1%3A01%3A43%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3E1%3A00%3A00%20PM%3C%2FTD%3E%3CTD%3E1%3A57%3A49%20PM%3C%2FTD%3E%3CTD%3E0%3A57%3A49%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3E10%3A00%3A00%20AM%3C%2FTD%3E%3CTD%3E9%3A02%3A00%20AM%3C%2FTD%3E%3CTD%3E%23VALUE!%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3E10%3A00%3A00%20AM%3C%2FTD%3E%3CTD%3E11%3A02%3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E%3CTD%3E10%3A50%3A57%20AM%3C%2FTD%3E%3CTD%3E0%3A50%3A57%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3E3%3A25%3A00%20PM%3C%2FTD%3E%3CTD%3E4%3A10%3A00%20PM%3C%2FTD%3E%3CTD%3E0%3A45%3A00%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3E10%3A00%3A00%20AM%3C%2FTD%3E%3CTD%3E10%3A25%3A08%20AM%3C%2FTD%3E%3CTD%3E0%3A25%3A08%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3E11%3A00%3A00%20AM%3C%2FTD%3E%3CTD%3E11%3A25%3A00%20AM%3C%2FTD%3E%3CTD%3E0%3A25%3A00%3C%2FTD%3E%3C%2FTR%3E%3C%2FTBODY%3E%3C%2FTABLE%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1685787%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1685827%22%20slang%3D%22en-US%22%3ERe%3A%20Time%20Conditional%20Formatting%20Help%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1685827%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F370136%22%20target%3D%22_blank%22%3E%40Steve_Barone%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThat's%20like%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20593px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F219712i1BBCD0C4225987AA%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22image.png%22%20alt%3D%22image.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EIn%20formula%20it%20shall%20be%20reference%20on%20first%20cell%20in%20the%20range%20if%20that's%20not%20M1.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20future%20please%20submit%20small%20sample%20file%20instead%20of%20%2F%20in%20addition%20to%20copy%2Fpasted%20as%20text%20range.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1685848%22%20slang%3D%22en-US%22%3ERe%3A%20Time%20Conditional%20Formatting%20Help%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1685848%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F370136%22%20target%3D%22_blank%22%3E%40Steve_Barone%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIt%20appears%20to%20work%20-%20see%20the%20screenshot%20and%20attached%20workbook.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22S3529.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F219713i4CFE36711C098434%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20title%3D%22S3529.png%22%20alt%3D%22S3529.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20you%20can't%20get%20it%20to%20work%2C%20could%20you%20attach%20a%20copy%20of%20your%20workbook%20without%20sensitive%2Fproprietary%20information%3F%3C%2FP%3E%0A%3CP%3E%E2%80%83%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1685908%22%20slang%3D%22en-US%22%3ERe%3A%20Time%20Conditional%20Formatting%20Help%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1685908%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F521%22%20target%3D%22_blank%22%3E%40Sergei%20Baklan%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CDIV%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%3CP%3EI%20attached%20a%20sample%20of%20my%20data%2C%20I%20am%20using%20Office%202016.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhen%20I%20tried%20it%2C%20it%20wouldn't%20work%20the%20way%20it%20did%20for%20you.%20Does%20it%20matter%20that%20I%20factored%20in%20headers%3F%20I%20made%20it%20M2%20instead%20of%20M1.%20Not%20sure%20if%20my%20picture%20that%20I%20tried%20to%20upload%20worked%2C%20I%20can't%20see%20it%20again.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Occasional Contributor

Hi Excel folks,

 

I'm stuck on how to get a conditional formatting for time to work. I've tried MANY different iterations and it's not working. One of them seemed to highlight part of what I wanted but it still wasn't correct. Once I changed it just slightly, it completely broke and highlighted everything. Any help would be appreciated!

 

I am trying to write a conditional formatting formula that says anything in column M that is greater than 15 minutes, (0,15,1) should be highlighted. I've tried using the "Format all cells based on their values" and set one for <TIME(0,15,0) and one for >TIME(0,15,1) but that doesn't do anything at all. Same thing with ="TIME(0,15,1)" and ="TIME(23,59,59)" for min/max values

 

I've also tried =TEXT($B$1,"hh:mm:ss")>"00:15:00" but that highlighted everything in the entire column.

 

I've tried using the one below but that too doesn't work, it highlights random things but not what I want.

=(M2+0 > TIME(0,15,0))

 

I tried formatting column M as time hh:mm:ss in cell format, with no real difference. I then tried formatting it as text, and same, no difference. I don't mind if I get a negative value, represented by #VALUE! since I can filter those out.

 

Colum K                        Column L      Column M

3:00:00 PM4:01:43 PM1:01:43
1:00:00 PM1:57:49 PM0:57:49
10:00:00 AM9:02:00 AM#VALUE!
10:00:00 AM11:02:09 AM1:02:09
9:00:00 AM10:30:00 AM1:30:00
9:30:00 AM9:00:00 AM#VALUE!
9:00:00 AM9:32:00 AM0:32:00
1:00:00 PM3:00:00 PM2:00:00
2:00:00 PM1:57:34 PM#VALUE!
10:30:00 AM12:07:00 PM1:37:00
10:00:00 AM9:04:53 AM#VALUE!
11:00:00 AM11:09:14 AM0:09:14
8:00:00 AM8:13:12 AM0:13:12
3:00:00 PM4:00:00 PM1:00:00
1:00:00 PM1:06:05 PM0:06:05
10:00:00 AM10:15:00 AM0:15:00
8:00:00 AM8:22:04 AM0:22:04
8:30:00 AM8:33:00 AM0:03:00
1:00:00 PM12:58:14 PM#VALUE!
2:00:00 PM3:00:32 PM1:00:32
2:15:00 PM #VALUE!
11:30:00 AM11:35:00 AM0:05:00
10:30:00 AM10:10:00 AM#VALUE!
1:00:00 PM1:06:00 PM0:06:00
2:30:00 PM2:54:00 PM0:24:00
2:30:00 PM1:15:00 PM#VALUE!
10:00:00 AM10:16:36 AM0:16:36
11:00:00 AM10:49:00 AM#VALUE!
8:30:00 AM8:55:00 AM0:25:00
1:00:00 PM1:15:00 PM0:15:00
3:25:00 PM4:10:00 PM0:45:00
10:00:00 AM10:50:57 AM0:50:57
3:25:00 PM4:10:00 PM0:45:00
10:00:00 AM10:25:08 AM0:25:08
11:00:00 AM11:25:00 AM0:25:00
6 Replies
Highlighted

@Steve_Barone 

That's like

image.png

In formula it shall be reference on first cell in the range if that's not M1.

 

In future please submit small sample file instead of / in addition to copy/pasted as text range.

Highlighted

@Steve_Barone 

It appears to work - see the screenshot and attached workbook.

 

S3529.png

 

If you can't get it to work, could you attach a copy of your workbook without sensitive/proprietary information?

Highlighted

@Sergei Baklan 

 

 

I attached a sample of my data, I am using Office 2016.

 

When I tried it, it wouldn't work the way it did for you. Does it matter that I factored in headers? I made it M2 instead of M1. Not sure if my picture that I tried to upload worked, I can't see it again.

Highlighted
Thanks, I attached a bit of the data in my other reply, with all sensitivity removed.
Highlighted

@Steve_Barone 

The formula in C2 should be =B2-A2, not =TEXT(...).

And your conditional formatting formula should not refer to M2 in this sample workbook but to C2, of course.

But it's easier to use a rule of the type "Format only cells that contain".

 

S3530.png

Highlighted

@Steve_Barone 

Another option compare to what @Hans Vogelaar suggested is keep the range to which conditional formatting is applied as it is, i.e. entire column C. I'm not sure why you convert time difference into the text, but we also could keep it as it is. 

With that we may apply the rule as

image.png

using absolute references on Start/End columns and relative reference on current row, starting from very first row of the range, i.e. first one.

 

With that it doesn't matter which information you return into column C, we only format it depends on values in Time and Actual Time columns.

 

Bottom line - creating formula for the rule always do it for the first cell of the range to which the rule is applied and take care about absolute/relative references to be sure formula correctly works if virtually move it on another cells.