Message on a specific value on a range of cells

Juls1

New Member
Joined
May 23, 2019
Messages
2
I want a message to pop up if the value on any cell in of a range of cells is equal to 'False"

at the moment I only can run it if one cell is equal to false. but I want to add the condition so it includes if any cell in a range (A:1 to A:10) is equal to 'false'

Private Sub Worksheet_Calculate()
If Range("BP7").Value = False Then
MsgBox "Update The Schedule Start time"

End Sub

Thanks for the help
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Try

Code:
Private Sub Worksheet_Calculate()
If Not Intersect(ActiveCell, Range("A1:A10")) Is Nothing Then
    MsgBox "Update The Schedule Start time"
End If
End Sub

or to include BP7

Code:
Private Sub Worksheet_Calculate()
If Not Intersect(ActiveCell, Range("A1:A10")) Is Nothing or Not Intersect(ActiveCell, Range("BP7")) Is Nothing Then
    MsgBox "Update The Schedule Start time"
End If
End Sub
 
Last edited:
Upvote 0
How about
Code:
Private Sub Worksheet_Calculate()
   If Application.CountIf(Range("A1:A10"), False) > 0 Then
      MsgBox "Update The Schedule Start time"
   End If
End Sub
 
Upvote 0
Thanks you so much... it works perfectly. I have being going around with this for few days now...:laugh:
 
Upvote 0
Glad we could help & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,287
Members
452,631
Latest member
a_potato

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