#1   Report Post  
Posted to microsoft.public.excel.misc
sot sot is offline
external usenet poster
 
Posts: 19
Default Data Validation?

I enter a Cost code into a cell and for all instances these cost codes are
allowed except for one. For this one exception, I want to allow the entry
but bring up a warning box to ask user to check the entry. Is this possible
in Data Validation or must I use some other way. I know I could just use and
IF, but I don't want to add another column to my worksheet.

Many thanks for any responses
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default Data Validation?

If you have a custom type in Validation with a formula to say

=H1<"my value"

and then on the error tab set the style to Warning, the message will come up
but the user can Continue.

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



"sot" wrote in message
...
I enter a Cost code into a cell and for all instances these cost codes are
allowed except for one. For this one exception, I want to allow the entry
but bring up a warning box to ask user to check the entry. Is this
possible
in Data Validation or must I use some other way. I know I could just use
and
IF, but I don't want to add another column to my worksheet.

Many thanks for any responses



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,339
Default Data Validation?

I don't believe you can check using Data Validation but the code below would
allow a check. Insert this code into the worksheet where you want the check
to work.

Change $A$1 to the cell you require and 1234 to your "code".

Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
On Error GoTo endsub
If Application.And(Target = Range("$A$1"), Target.Value = 1234) Then
MsgBox "Warning - check this code " & Target.Value
End If
endsub:
Application.EnableEvents = True
End Sub

HTH

"sot" wrote:

I enter a Cost code into a cell and for all instances these cost codes are
allowed except for one. For this one exception, I want to allow the entry
but bring up a warning box to ask user to check the entry. Is this possible
in Data Validation or must I use some other way. I know I could just use and
IF, but I don't want to add another column to my worksheet.

Many thanks for any responses

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Validation Data using Validation Table cell range..... Dermot Excel Discussion (Misc queries) 16 January 5th 10 09:35 PM
data validation invalid in dynamic validation list ilia Excel Discussion (Misc queries) 0 November 7th 06 12:54 PM
data validation invalid in dynamic validation list ilia Excel Worksheet Functions 0 November 7th 06 12:54 PM
Data validation with validation lists and combo boxs Keith Excel Discussion (Misc queries) 1 October 12th 06 11:08 AM
Refresh existing data when changed in data validation list problem girl New Users to Excel 1 September 28th 05 10:19 PM


All times are GMT +1. The time now is 04:21 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"