Excel Data Validation of Formatted Time not working

wezuk03

New Member
Joined
Oct 21, 2014
Messages
5
Hello,

I am creating a weekly room booking sheet, and I want to make it clear to users when they input a time that if it starts before the end of the previous time, then a warning will pop up. Using data validation, this should be relatively easy.

However, I can't seem to get it to work. The data validation of cell B2 says that if the time in it's cell is less than or equal to cell A1, then to show a warning. However, when I input a time that is less than or equal to A1, it doesn't throw any warning.

If I set the data validation to just equal to cell A1, it does work if I put the same time in B2

What am I doing wrong here?

Thanks!
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Welcome to the board

The data validation of cell B2 says that if the time in it's cell is less than or equal to cell A1, then to show a warning.
You have the logic of data validation reversed.

Validation will Allow the entry of a value when the Criteria IS Satisfied.
The Validation Message will be shown (and entry not allowed) when the value entered does NOT satisfy the criteria.
 
Upvote 0
Howabout

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Range("B1") <= Range("A1") Then
MsgBox "Check Time Please"
End If
End Sub

In VBA
 
Upvote 0

Forum statistics

Threads
1,216,045
Messages
6,128,484
Members
449,455
Latest member
jesski

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