#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default Validation

hi all,
one more short question.
i need to creat on certain columns on a worksheet the following
validation.
the number should be between 0-1000, in case that the nuber is above
500 a message will appear with a certain warning, but the cell will
not be blocked and the value above 500 will be entered as usual.
thanks a lot

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Validation

You can use a worksheet changge function such as the one below. You need to
add all the columns you need to be validated. I assume you had a validation
already set for 1 - 1000. You could eliminate the validation and make all
your checks in the worksheet change


Sub worksheet_change(ByVal Target As Range)

If Target.Column = 1 Then

If (Target 500) And (Target <= 1000) Then

MsgBox ("Value needs to be between 1 and 1000")

End If
End If

End Sub

"Guye" wrote:

hi all,
one more short question.
i need to creat on certain columns on a worksheet the following
validation.
the number should be between 0-1000, in case that the nuber is above
500 a message will appear with a certain warning, but the cell will
not be blocked and the value above 500 will be entered as usual.
thanks a lot


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default Validation

thanks Joel, it works perfectly

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 Programming 0 November 7th 06 12:54 PM
Validation (Drop down list vs simple text length validation) Bob Phillips[_6_] Excel Programming 2 April 27th 04 07:47 PM
Validation (Drop down list vs simple text length validation) Jason Morin[_2_] Excel Programming 1 April 27th 04 04:56 PM
Validation (Drop down list vs simple text length validation) Pete McCosh Excel Programming 0 April 27th 04 03:49 PM


All times are GMT +1. The time now is 07:11 PM.

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"