How to mark color in particular cell value in excel

Hi Guys,

I need to mark Red in above 15min (00:15:00) time in one column and below 15 min show to green


i have values in times(00:04:00) ,(00:10:00) in one columns , i need to find above(00:15:00), once find above (00:15:00) i want automatically mark color red, otherwise shows Green ,


please anyone help me out from this.

Raja G

Hi @Raja.G - Here you go…

Set Range Color Properties


Here idx is Int32 varaible which starts with 0 by default. That’s why i have +2 to get the exact row.



1 Like

Hi @prasath17

Small doubt in between

Can we compare by string

Is it should be converted to datetime while comapring using if Condition

Hi @NIVED_NAMBIAR …Even I had this doubt before trying that solution…but it worked…my cells are formatted to custom value of hh:mm:ss

if this didn’t work for the @Raja.G then, we have to use datetime.parseexact

1 Like

Are you allowed to use Conditional Formatting?

1 Like

Hi @prasath17 ,

Thanks for your help, working fine

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.