conditional format

JOEE1979

Active Member
Joined
Dec 18, 2022
Messages
250
Office Version
  1. 365
Platform
  1. Windows
I have a conditional format (cell value of N4:N27 is greater than N1 then highlight cell) but it dont work, not sure why.

Weekday Bus Cycling - January 2023 - steeprock.xlsx
N
119:17:02
2Sign on
3
410:05:00
510:40:00
611:50:00
712:05:00
812:19:00
912:50:00
1013:20:00
1113:30:00
1213:35:00
1313:55:00
1414:05:00
1514:20:00
1614:30:00
1714:45:00
1815:05:00
1921:30:00
20
21
22
23
2410:45:00
25
26
27
Table 1
Cell Formulas
RangeFormula
N1N1=NOW()
Cells with Conditional Formatting
CellConditionCell FormatStop If True
N4:N27Cell Value>=$N$1textNO
 
how would I be able to add how many highlighted cells show up?
I tried
=CountCellsByColor(data_range, cell_color) but that didnt work
 
Last edited:
Upvote 0

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
how would I be able to add how many highlighted cells show up?
You would use exactly the same condition as the conditional formatting used. Something like

Excel Formula:
=COUNTIF(N4:N40,">="&N1)

You should note though that neither the conditional formatting nor this formula will automatically update as time goes by. There needs to be something to cause the worksheet to recalculate to trigger any reassessment of the formula or conditional formatting results.
 
Upvote 0
You would use exactly the same condition as the conditional formatting used. Something like

Excel Formula:
=COUNTIF(N4:N40,">="&N1)

You should note though that neither the conditional formatting nor this formula will automatically update as time goes by. There needs to be something to cause the worksheet to recalculate to trigger any reassessment of the formula or conditional formatting results.
I put a VBA code in the workbook

VBA Code:
Sub Refresh_My_Data()

ActiveWorkbook.RefreshAll

Call Update_Data

End Sub

Sub Update_Data()

Application.OnTime Now + TimeValue("00:05:00"), "Refresh_My_Data"

End Sub

Let me know if you have a better code.
Thanks
 
Upvote 0
the problem I'm having is that the time won't update automatically, I have to type something to make it refresh
 
Upvote 0

Forum statistics

Threads
1,214,651
Messages
6,120,744
Members
448,989
Latest member
mariah3

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