Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15
Default desperate and urgent

i need a macro that will make a cell value blank when another cell is changed.

i cant use a formula because the cell that needs to be blank has data
validation on it and so takes entry from a list

short example of what i want is:

if cell D9 is changed in any way then cells D10,D11 and D12 will be cleared
( = "")

please help

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 60
Default desperate and urgent

Not sure exactly what you want but this does it as best I can understand

Dim dTest As String
Dim myChange As Boolean

Private Sub Worksheet_Activate()
dTest = Range("D9").Value
myChange = False

End Sub

Private Sub Worksheet_Calculate()
End Sub

Private Sub Worksheet_Change(ByVal Target As Range)


If myChange = False Then
If Range("D9").Value < dTest Then
Range("D10") = ""
Range("D11") = ""
Range("D12") = ""
myChange = True
End If
End If

End Sub

--
-John Northwest11
Please rate when your question is answered to help us and others know what
is helpful.


"max power" wrote:

i need a macro that will make a cell value blank when another cell is changed.

i cant use a formula because the cell that needs to be blank has data
validation on it and so takes entry from a list

short example of what i want is:

if cell D9 is changed in any way then cells D10,D11 and D12 will be cleared
( = "")

please help

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,124
Default desperate and urgent

Please endeavor to use a more descriptive subject line. All requests here
are considered to be desperate and urgent and this can anger some. See if
this helps

right click sheet tabview codeinsert thisSAVE workbook

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address < "$D$9" Then Exit Sub
Range("d10:d12").ClearContents
'if you want to remove the validation entirely change to .clear instead of
..clearcontents
End Sub

--
Don Guillett
SalesAid Software

"max power" wrote in message
...
i need a macro that will make a cell value blank when another cell is
changed.

i cant use a formula because the cell that needs to be blank has data
validation on it and so takes entry from a list

short example of what i want is:

if cell D9 is changed in any way then cells D10,D11 and D12 will be
cleared
( = "")

please help



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
urgent and desperate max power Excel Discussion (Misc queries) 2 December 29th 06 06:14 AM
In desperate need of help.... mrskitz Excel Discussion (Misc queries) 3 January 13th 06 02:48 PM
Urgent Help Needed with coloumn compare Brento Excel Discussion (Misc queries) 1 July 29th 05 12:35 AM


All times are GMT +1. The time now is 04:16 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"