Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Auto delete cell content

HI
I have a worksheet wherein at cell C8 i have put a validation as
follows
in case the value at B8 is more than zero then only any value in the
cell C8 can be fed.

The same is working , however in case i change the value at cell B8
from any number to zero the values at cell C8 does not get deleted.

does any body knows how to tackle this

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Auto delete cell content

Data|Validation isn't retroactive--if you change the rules, then the existing
value isn't validated.

And if you want to actually clear the second cell, you're going to have to use a
macro--maybe an event macro like this:

Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
Dim myCell As Range
Set myCell = Me.Range("a1")
If Intersect(Target, myCell) Is Nothing Then Exit Sub

If IsEmpty(myCell.Value) Then
Application.EnableEvents = False
me.range("B1").Value = ""
Application.EnableEvents = True
End If

End Sub

If you want to try, I had my parent cell as A1 and my child as B1.

Rightclick on the worksheet tab that should have this behavior. Select view
code and paste this in (adjust those addresses). Then back to excel.

wrote:

HI
I have a worksheet wherein at cell C8 i have put a validation as
follows
in case the value at B8 is more than zero then only any value in the
cell C8 can be fed.

The same is working , however in case i change the value at cell B8
from any number to zero the values at cell C8 does not get deleted.

does any body knows how to tackle this


--

Dave Peterson
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
Delete cell content Chuck Neal Excel Discussion (Misc queries) 3 June 14th 06 05:05 PM
Delete Row based off cell content Chuck Neal Excel Discussion (Misc queries) 3 March 29th 06 08:52 PM
auto delete characters in cell left of @ sign Rusty Setting up and Configuration of Excel 9 January 23rd 06 06:14 PM
Hide/Delete entire rows based in the content of one cell Clueless Excel Discussion (Misc queries) 2 October 3rd 05 02:40 PM
can't delete a cell content in excel Mark B New Users to Excel 3 May 6th 05 06:42 PM


All times are GMT +1. The time now is 09:55 AM.

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"