Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
daidipya
 
Posts: n/a
Default existing data in case of data validation

I am using data validation in number of cells. Assume a case where i
have data validation where i have restricted the value in cell no A25
not to exceed a value which is appearing at cell no A24. Now assuming
that the value at Cell A24 is 100 the data validation rightly does not
allow me to feed any value over 100 at cell no A25. Now assuming that I
have fed vale 35 at cell no. A25 it allows me to feed the value. Now in
case if i change the value of cell A24 to 23 no error report is
generated even though the Value at Cell No A25 is 35 which is greater
than the value of 23 as appearing at cell no A24.

please guide

  #2   Report Post  
Posted to microsoft.public.excel.misc
Ron Coderre
 
Posts: n/a
Default existing data in case of data validation

daidipya:

Data Validation doesn't work the way you described. It's basically a nice
feature to restrict direct input to cells upon entry. It doesn't engage on
those cells again until there is a change to the cell....not to the
validation condition. And it doesn't prevent users from finding ways to enter
invalid data.

To do what you're looking for, you'd need to create a small VBA procedure to
trap changes to cell A24 and reflect them in A25.

Perhaps something like this (entered in the worksheet module):

'--------Start of Code------
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("A24")) Is Nothing Then
If Range("A25") Range("A24") Then
Range("A25").ClearContents
End If
End If
End Sub
'--------End of Code------

That code traps changes to cell A24.
After the change, if A25 is greater than A24....then, A25 is cleared.
Otherwise, no change to A25.

Note: By putting a vba program in your workbook, users will be prompted to
enable macros when they open the workbook. If they disable macros...that code
won't run.

I hope that helps.
***********
Regards,
Ron

XL2002, WinXP


"daidipya" wrote:

I am using data validation in number of cells. Assume a case where i
have data validation where i have restricted the value in cell no A25
not to exceed a value which is appearing at cell no A24. Now assuming
that the value at Cell A24 is 100 the data validation rightly does not
allow me to feed any value over 100 at cell no A25. Now assuming that I
have fed vale 35 at cell no. A25 it allows me to feed the value. Now in
case if i change the value of cell A24 to 23 no error report is
generated even though the Value at Cell No A25 is 35 which is greater
than the value of 23 as appearing at cell no A24.

please guide


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
VBA Monty Excel Worksheet Functions 2 January 30th 06 01:37 PM
VBA Code Cell Mate Excel Discussion (Misc queries) 4 January 9th 06 08:52 PM
reminder notifications in a column L Mieth Excel Discussion (Misc queries) 6 June 10th 05 11:00 AM
Conversion SVC Excel Worksheet Functions 9 February 28th 05 02:29 PM
Spellnumber Norman Jones Excel Worksheet Functions 6 December 13th 04 07:21 AM


All times are GMT +1. The time now is 06:03 PM.

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

About Us

"It's about Microsoft Excel"