Possible conditional formatting solution??

Copper Contributor

Hi, 


I’m working with data that has time intervals, temperature, and other values in the columns. Whenever the temp hits a specific value, I have done conditional formatting highlight it so then I can find the time intervals. When working with data that has tens of thousands of rows, is there a way to skip to or record specific areas of data that are highlighted inconsistently instead of having to keep scrolling on the document? Same for finding columns that have gabs? For example, I need the first highlighted cell time time and then the cell that’s right after the highlighted box if that makes sense. It’s been such a tedious process to do. I feel like a what/if then statement could work?? I attached a photo trying to better explain. I wrote “1762” but I meant to write the cell with value  “1752”.

please help!! 

57501281-4FCF-4D8D-B517-E53D57279C72.jpeg

Thanks! 

6 Replies

@Jazlyn_Elsie 

=AND(E2<>"",E2<10)

In the example i've assumed that this is the rule for conditional formatting.

=FILTER(B2:B18,(E2:E18=""))

This is the FILTER function in cell G2 that selects all times if the corresponding cell in column E is blank.

=IF(OR(AND(AND(E2<>"",E2<10)=TRUE,AND(E1<>"",E1<10)=FALSE),AND(NOT(ISBLANK(E2)),AND(E2<>"",E2<10)=FALSE,AND(E1<>"",E1<10)=TRUE)),1,"")

This is the formula in cell H2 in the example which returns "1" if the condition is true. You can then select cell H2 and skip down to all cells that contain "1" with ctrl and arrow down.

filter.JPG

=FILTER(B2:B18,(E2:E18<>"")*(E2:E18<10)*((E1:E17>=10)+(E1:E17="")))

This FILTER function records all times at the beginning of a conditionally formatted range.

filter start of highlighted range.JPG

Sorry about the delay in getting back to you. I went on vacation.

I didn't use a conditional format, I filtered any number that was less than ten and blanks. I should have highlighted the blanks in yellow too. Do I have to use the conditional format for your formula to work? I tried this formula for the data range because my data starts at E33 and ends at E22354: =IF(OR(AND(AND(E33<>"",E33<10)=TRUE,AND(E32<>"",E32<10)=FALSE),AND(NOT(ISBLANK(E33)),AND(E33<>"",E33<10)=FALSE,AND(E32<>"",E32<10)=TRUE)),1,"") but this did not work.

For the filter formula, I tried adding the dates as well because I need both the dates and times, but "#SPILL!" was returned when using this formula: =FILTER(A33:B22354,(E33:E22354=""))

For example, I'd like both 2022/12/31 23:58:00 to show up with the formula

@OliverScheurich 

These images might help explain a bit more. 

 

Picture4.png

@jazzyelsie 

=FILTER(A33:B22354,(E33:E22354=""),"")

This FILTER function returns the dates and times from columns A and B.

You can read here why SPILL error occurs - Spill range isn't blank - and how to fix this error.

How to correct a #SPILL! error - Microsoft Support

FILTER.JPG

 

  

Conditional formatting isn't required for the formulas to work but since you are working with thousands of rows i'd apply conditional formatting. It's better to visualize the rows with values less than 10 in my opinion.

 

I didn't filter numbers less than 10 and blanks and the formula returns the expected result. The formula is in cell H33 and it enters "1" in the intended rows.

 

=IF(OR(AND(AND(E33<>"",E33<10)=TRUE,AND(E32<>"",E32<10)=FALSE),AND(NOT(ISBLANK(E33)),AND(E33<>"",E33<10)=FALSE,AND(E32<>"",E32<10)=TRUE)),1,"")

 

if or.JPG

@OliverScheurich 

The conditional formatting did work. I attached my Excel document. I also copy and pasted some of the data. Are you entering the formula in column H at the start of the data? When I go to enter that formula, only the first column returns 1 despite the rows beneath it being highlighted.

 

In the attached Table 1 below, the column labeled "MAX" is what I used the conditional formatting to highlight the boxes that are blank and <10. When I entered the formula you gave me, I noticed that it isn't giving me the date and start time followed by the end time of the last highlighted box. For example, since cell 33 is <10 and highlighted (in this case I couldn't highlight, so I changed the font to red), the date and start I need the formula to output is 2022/12/31 23:58:00 with the end time being cell 443 because it ends after the last data value in cell 442, so the end time or stop time I need is 2023/01/01 13:38:00. Right after, there is a Gap time, so I need to do the same thing. In this example, the Gap also starts at cell 443, so the start time is 

2023/01/0113:38:00

with a stop time of 

2023/01/0113:56:00

If possible, I would like to be able to have a code that writes GAP off to the side as seen in the second table, but that isn't urgent.

The third time interval occurs right after the GAP in this particular dataset, so I would write the start time of 

2023/01/0113:58:00

and the end time of 

2023/01/0305:42:00

 

Based on the formula you gave me, I tried tweaking it to: =IF(OR(AND(AND(E33<>"",E33<10)=TRUE,AND(E32<>"",E32<10)=FALSE),AND(NOT(ISBLANK(E33)),AND(E33<>"",E33<10)=FALSE,AND(E32<>"",E32<10)=TRUE)),1,""), however this did not work. Hopefully my explanation makes sense. I have to do the same thing for column M with conditional formatting and the formula as well. 

 

Also, thank you so much for your time and help thus far! 

 

 

Table 1

DateTimesecMINMAX
2022/12/3123:58:000.00066 (cell 33)
2023/01/0100:00:000.00066
2023/01/0100:02:000.00066
2023/01/0100:04:000.00066
2023/01/0100:06:000.00066
2023/01/0100:08:000.00066
2023/01/0100:10:000.00066
2023/01/0100:12:000.00066
2023/01/0100:14:000.00066
2023/01/0100:16:000.00066
2023/01/0100:18:000.00066
2023/01/0100:20:000.00066
2023/01/0100:22:000.00066
2023/01/0100:24:000.00066
2023/01/0100:26:000.00066
2023/01/0100:28:000.00066
2023/01/0100:30:000.00066
2023/01/0100:32:000.00066
2023/01/0100:34:000.00066
2023/01/0100:36:000.00066
2023/01/0100:38:000.00066
2023/01/0100:40:000.00066
2023/01/0100:42:000.00066
2023/01/0100:44:000.00066
2023/01/0100:46:000.00066
2023/01/0100:48:000.00066
2023/01/0100:50:000.00066
2023/01/0100:52:000.00066
2023/01/0100:54:000.00066
2023/01/0100:56:000.00066
2023/01/0100:58:000.00066
2023/01/0101:00:000.00066
2023/01/0101:02:000.00066
2023/01/0101:04:000.00066
2023/01/0101:06:000.00066
2023/01/0101:08:000.00066
2023/01/0101:10:000.00066
2023/01/0101:12:000.00066
2023/01/0101:14:000.00066
2023/01/0101:16:000.00066
2023/01/0101:18:000.00066
2023/01/0101:20:000.00066
2023/01/0101:22:000.00066
2023/01/0101:24:000.00066
2023/01/0101:26:000.00066
2023/01/0101:28:000.00066
2023/01/0101:30:000.00056
2023/01/0101:32:000.00066
2023/01/0101:34:000.00066
2023/01/0101:36:000.00066
2023/01/0101:38:000.00066
2023/01/0101:40:000.00066
2023/01/0101:42:000.00066
2023/01/0101:44:000.00066
2023/01/0101:46:000.00066
2023/01/0101:48:000.00066
2023/01/0101:50:000.00066
2023/01/0101:52:000.00066
2023/01/0101:54:000.00066
2023/01/0101:56:000.00066
2023/01/0101:58:000.00066
2023/01/0102:00:000.00066
2023/01/0102:02:000.00066
2023/01/0102:04:000.00066
2023/01/0102:06:000.00066
2023/01/0102:08:000.00066
2023/01/0102:10:000.00066
2023/01/0102:12:000.00066
2023/01/0102:14:000.00066
2023/01/0102:16:000.00066
2023/01/0102:18:000.00066
2023/01/0102:20:000.00066
2023/01/0102:22:000.00066
2023/01/0102:24:000.00066
2023/01/0102:26:000.00066
2023/01/0102:28:000.00066
2023/01/0102:30:000.00066
2023/01/0102:32:000.00066
2023/01/0102:34:000.00066
2023/01/0102:36:000.00066
2023/01/0102:38:000.00066
2023/01/0102:40:000.00066
2023/01/0102:42:000.00066
2023/01/0102:44:000.00066
2023/01/0102:46:000.00066
2023/01/0102:48:000.00066
2023/01/0102:50:000.00066
2023/01/0102:52:000.00066
2023/01/0102:54:000.00066
2023/01/0102:56:000.00066
2023/01/0102:58:000.00066
2023/01/0103:00:000.00066
2023/01/0103:02:000.00066
2023/01/0103:04:000.00056
2023/01/0103:06:000.00066
2023/01/0103:08:000.00066
2023/01/0103:10:000.00066
2023/01/0103:12:000.00066
2023/01/0103:14:000.00066
2023/01/0103:16:000.00066
2023/01/0103:18:000.00066
2023/01/0103:20:000.00066
2023/01/0103:22:000.00066
2023/01/0103:24:000.00066
2023/01/0103:26:000.00066
2023/01/0103:28:000.00066
2023/01/0103:30:000.00066
2023/01/0103:32:000.00066
2023/01/0103:34:000.00066
2023/01/0103:36:000.00066
2023/01/0103:38:000.00066
2023/01/0103:40:000.00066
2023/01/0103:42:000.00066
2023/01/0103:44:000.00066
2023/01/0103:46:000.00066
2023/01/0103:48:000.00066
2023/01/0103:50:000.00066
2023/01/0103:52:000.00066
2023/01/0103:54:000.00066
2023/01/0103:56:000.00066
2023/01/0103:58:000.00066
2023/01/0104:00:000.00066
2023/01/0104:02:000.00066
2023/01/0104:04:000.00066
2023/01/0104:06:000.00066
2023/01/0104:08:000.00066
2023/01/0104:10:000.00066
2023/01/0104:12:000.00066
2023/01/0104:14:000.00066
2023/01/0104:16:000.00066
2023/01/0104:18:000.00066
2023/01/0104:20:000.00056
2023/01/0104:22:000.00066
2023/01/0104:24:000.00066
2023/01/0104:26:000.00066
2023/01/0104:28:000.00066
2023/01/0104:30:000.00066
2023/01/0104:32:000.00066
2023/01/0104:34:000.00066
2023/01/0104:36:000.00066
2023/01/0104:38:000.00066
2023/01/0104:40:000.00066
2023/01/0104:42:000.00066
2023/01/0104:44:000.00066
2023/01/0104:46:000.00066
2023/01/0104:48:000.00066
2023/01/0104:50:000.00066
2023/01/0104:52:000.00066
2023/01/0104:54:000.00066
2023/01/0104:56:000.00066
2023/01/0104:58:000.00066
2023/01/0105:00:000.00066
2023/01/0105:02:000.00066
2023/01/0105:04:000.00066
2023/01/0105:06:000.00066
2023/01/0105:08:000.00066
2023/01/0105:10:000.00066
2023/01/0105:12:000.00066
2023/01/0105:14:000.00066
2023/01/0105:16:000.00066
2023/01/0105:18:000.00066
2023/01/0105:20:000.00066
2023/01/0105:22:000.00066
2023/01/0105:24:000.00056
2023/01/0105:26:000.00066
2023/01/0105:28:000.00066
2023/01/0105:30:000.00066
2023/01/0105:32:000.00066
2023/01/0105:34:000.00066
2023/01/0105:36:000.00066
2023/01/0105:38:000.00066
2023/01/0105:40:000.00066
2023/01/0105:42:000.00066
2023/01/0105:44:000.00066
2023/01/0105:46:000.00066
2023/01/0105:48:000.00056
2023/01/0105:50:000.00066
2023/01/0105:52:000.00066
2023/01/0105:54:000.00066
2023/01/0105:56:000.00066
2023/01/0105:58:000.00066
2023/01/0106:00:000.00066
2023/01/0106:02:000.00066
2023/01/0106:04:000.00066
2023/01/0106:06:000.00066
2023/01/0106:08:000.00066
2023/01/0106:10:000.00066
2023/01/0106:12:000.00066
2023/01/0106:14:000.00066
2023/01/0106:16:000.00066
2023/01/0106:18:000.00066
2023/01/0106:20:000.00066
2023/01/0106:22:000.00066
2023/01/0106:24:000.00066
2023/01/0106:26:000.00066
2023/01/0106:28:000.00066
2023/01/0106:30:000.00066
2023/01/0106:32:000.00066
2023/01/0106:34:000.00056
2023/01/0106:36:000.00066
2023/01/0106:38:000.00066
2023/01/0106:40:000.00066
2023/01/0106:42:000.00066
2023/01/0106:44:000.00066
2023/01/0106:46:000.00066
2023/01/0106:48:000.00056
2023/01/0106:50:000.00056
2023/01/0106:52:000.00066
2023/01/0106:54:000.00066
2023/01/0106:56:000.00066
2023/01/0106:58:000.00066
2023/01/0107:00:000.00066
2023/01/0107:02:000.00066
2023/01/0107:04:000.00066
2023/01/0107:06:000.00066
2023/01/0107:08:000.00066
2023/01/0107:10:000.00056
2023/01/0107:12:000.00066
2023/01/0107:14:000.00066
2023/01/0107:16:000.00056
2023/01/0107:18:000.00066
2023/01/0107:20:000.00066
2023/01/0107:22:000.00066
2023/01/0107:24:000.00066
2023/01/0107:26:000.00066
2023/01/0107:28:000.00066
2023/01/0107:30:000.00066
2023/01/0107:32:000.00066
2023/01/0107:34:000.00066
2023/01/0107:36:000.00066
2023/01/0107:38:000.00066
2023/01/0107:40:000.00066
2023/01/0107:42:000.00066
2023/01/0107:44:000.00066
2023/01/0107:46:000.00066
2023/01/0107:48:000.00066
2023/01/0107:50:000.00066
2023/01/0107:52:000.00066
2023/01/0107:54:000.00056
2023/01/0107:56:000.00066
2023/01/0107:58:000.00066
2023/01/0108:00:000.00066
2023/01/0108:02:000.00066
2023/01/0108:04:000.00066
2023/01/0108:06:000.00066
2023/01/0108:08:000.00066
2023/01/0108:10:000.00066
2023/01/0108:12:000.00066
2023/01/0108:14:000.00066
2023/01/0108:16:000.00066
2023/01/0108:18:000.00066
2023/01/0108:20:000.00067
2023/01/0108:22:000.00056
2023/01/0108:24:000.00066
2023/01/0108:26:000.00067
2023/01/0108:28:000.00067
2023/01/0108:30:000.00067
2023/01/0108:32:000.00067
2023/01/0108:34:000.00066
2023/01/0108:36:000.00066
2023/01/0108:38:000.00066
2023/01/0108:40:000.00067
2023/01/0108:42:000.00066
2023/01/0108:44:000.00066
2023/01/0108:46:000.00067
2023/01/0108:48:000.00067
2023/01/0108:50:000.00066
2023/01/0108:52:000.00066
2023/01/0108:54:000.00067
2023/01/0108:56:000.00067
2023/01/0108:58:000.00066
2023/01/0109:00:000.00066
2023/01/0109:02:000.00066
2023/01/0109:04:000.00066
2023/01/0109:06:000.00066
2023/01/0109:08:000.00067
2023/01/0109:10:000.00066
2023/01/0109:12:000.00066
2023/01/0109:14:000.00066
2023/01/0109:16:000.00066
2023/01/0109:18:000.00066
2023/01/0109:20:000.00066
2023/01/0109:22:000.00066
2023/01/0109:24:000.00066
2023/01/0109:26:000.00066
2023/01/0109:28:000.00066
2023/01/0109:30:000.00066
2023/01/0109:32:000.00066
2023/01/0109:34:000.00066
2023/01/0109:36:000.00066
2023/01/0109:38:000.00066
2023/01/0109:40:000.00066
2023/01/0109:42:000.00056
2023/01/0109:44:000.00066
2023/01/0109:46:000.00066
2023/01/0109:48:000.00066
2023/01/0109:50:000.00066
2023/01/0109:52:000.00066
2023/01/0109:54:000.00066
2023/01/0109:56:000.00066
2023/01/0109:58:000.00066
2023/01/0110:00:000.00066
2023/01/0110:02:000.00066
2023/01/0110:04:000.00066
2023/01/0110:06:000.00066
2023/01/0110:08:000.00066
2023/01/0110:10:000.00066
2023/01/0110:12:000.00066
2023/01/0110:14:000.00066
2023/01/0110:16:000.00066
2023/01/0110:18:000.00066
2023/01/0110:20:000.00066
2023/01/0110:22:000.00066
2023/01/0110:24:000.00066
2023/01/0110:26:000.00066
2023/01/0110:28:000.00066
2023/01/0110:30:000.00066
2023/01/0110:32:000.00066
2023/01/0110:34:000.00066
2023/01/0110:36:000.00066
2023/01/0110:38:000.00066
2023/01/0110:40:000.00066
2023/01/0110:42:000.00066
2023/01/0110:44:000.00066
2023/01/0110:46:000.00066
2023/01/0110:48:000.00066
2023/01/0110:50:000.00066
2023/01/0110:52:000.00066
2023/01/0110:54:000.00066
2023/01/0110:56:000.00066
2023/01/0110:58:000.00066
2023/01/0111:00:000.00066
2023/01/0111:02:000.00066
2023/01/0111:04:000.00066
2023/01/0111:06:000.00066
2023/01/0111:08:000.00066
2023/01/0111:10:000.00066
2023/01/0111:12:000.00056
2023/01/0111:14:000.00066
2023/01/0111:16:000.00066
2023/01/0111:18:000.00066
2023/01/0111:20:000.00066
2023/01/0111:22:000.00066
2023/01/0111:24:000.00066
2023/01/0111:26:000.00066
2023/01/0111:28:000.00066
2023/01/0111:30:000.00066
2023/01/0111:32:000.00066
2023/01/0111:34:000.00066
2023/01/0111:36:000.00066
2023/01/0111:38:000.00066
2023/01/0111:40:000.00066
2023/01/0111:42:000.00066
2023/01/0111:44:000.00066
2023/01/0111:46:000.00066
2023/01/0111:48:000.00056
2023/01/0111:50:000.00066
2023/01/0111:52:000.00056
2023/01/0111:54:000.00056
2023/01/0111:56:000.00066
2023/01/0111:58:000.00066
2023/01/0112:00:000.00056
2023/01/0112:02:000.00056
2023/01/0112:04:000.00056
2023/01/0112:06:000.00056
2023/01/0112:08:000.00056
2023/01/0112:10:000.00056
2023/01/0112:12:000.00056
2023/01/0112:14:000.00056
2023/01/0112:16:000.00056
2023/01/0112:18:000.00056
2023/01/0112:20:000.00056
2023/01/0112:22:000.00056
2023/01/0112:24:000.00056
2023/01/0112:26:000.00046
2023/01/0112:28:000.00056
2023/01/0112:30:000.00056
2023/01/0112:32:000.00056
2023/01/0112:34:000.00056
2023/01/0112:36:000.00056
2023/01/0112:38:000.00056
2023/01/0112:40:000.00056
2023/01/0112:42:000.00046
2023/01/0112:44:000.00046
2023/01/0112:46:000.00056
2023/01/0112:48:000.00056
2023/01/0112:50:000.00046
2023/01/0112:52:000.00056
2023/01/0112:54:000.00046
2023/01/0112:56:000.00056
2023/01/0112:58:000.00056
2023/01/0113:00:000.00046
2023/01/0113:02:000.00046
2023/01/0113:04:000.00046
2023/01/0113:06:000.00046
2023/01/0113:08:000.00046
2023/01/0113:10:000.00046
2023/01/0113:12:000.00046
2023/01/0113:14:000.00046
2023/01/0113:16:000.00046
2023/01/0113:18:000.00046
2023/01/0113:20:000.00046
2023/01/0113:22:000.00046
2023/01/0113:24:000.00046
2023/01/0113:26:000.00046
2023/01/0113:28:000.00045
2023/01/0113:30:000.00046
2023/01/0113:32:000.00045
2023/01/0113:34:000.00045
2023/01/0113:36:000.00045 (cell 442)
2023/01/0113:38:000.000 (cell 443)
2023/01/0113:40:000.000  
2023/01/0113:42:000.000  
2023/01/0113:44:000.000  
2023/01/0113:46:000.000  
2023/01/0113:48:000.000  
2023/01/0113:50:000.000  
2023/01/0113:52:000.000  
2023/01/0113:54:000.000  
2023/01/0113:56:000.0005156 (cell 452)
2023/01/0113:58:000.00057 (cell 453)

Table 2

STARTSTOPDURATION FORMULAS 
DATETIMEFORMULADATETIMEFORMULA 
2022/12/3123:58:0012/31/2022 23:582023/01/0113:38:0001/01/2023 13:3813 hours, 40 minutes 13.66667 
2023/01/0113:38:0001/01/2023 13:382023/01/0113:56:0001/01/2023 13:5618 minutes 0.3GAP
2023/01/0113:58:0001/01/2023 13:582023/01/0305:42:0001/03/2023 05:421 days, 15 hours, 44 minutes 39.73333 
2023/01/0305:42:0001/03/2023 05:422023/01/0308:24:0001/03/2023 08:242 hours, 42 minutes 2.7GAP
2023/01/0308:28:0001/03/2023 08:282023/01/0410:18:0001/04/2023 10:181 days, 1 hours, 50 minutes 25.83333 
2023/01/0411:48:0001/04/2023 11:482023/01/0411:50:0001/04/2023 11:502 minutes 0.033333 
2023/01/0415:20:0001/04/2023 15:202023/01/0415:32:0001/04/2023 15:3212 minutes 0.2 
2023/01/0417:54:0001/04/2023 17:542023/01/0421:46:0001/04/2023 21:463 hours, 52 minutes 3.866667 
2023/01/0421:50:0001/04/2023 21:502023/01/0505:42:0001/05/2023 05:427 hours, 52 minutes 7.866667 

@OliverScheurich 

 

I used the conditional formatting and entered the formula =E33:E22354<10, and included the blanks or GAPS as we like to call them. These were highlighted yellow. When I entered the FILTER formula, it worked, but wasn't correct. I tried adjusting it to work, but I couldn't figure it out. I attached a file I'm working on and made changes. The date and time of when it starts (which is the first highlighted data value) is recorded along with the date and time of when it ends, which is right after the last value. This gets confusing because a GAP (blanks) are also recorded, but count as a separate time. For example, in the Info tab attached in the Excel document, the start date and time should be 

2022/12/3123:58:00

The stop time is 

2023/01/0113:38:00

which falls into the GAP (blank cells). This is also recorded and counted as a new row, so the start of the next row in the "info tab" is cell 443 (from the data tab) with the start time of 

2023/01/0113:38:00 

and end time of 

2023/01/0113:56:00

 which is cell 452 (from the data tab).

Then, the third start time is cell 453 in the data tab with a start time of 

2023/01/0113:58:00

and end time of 

05:42:0001/03/2023 05:42

 

Also, thank you so much for your help thus far! I really appreciate it!