Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 131
Default Clear value if cell changes

Hi, I have in cell drop down validation in around 8 cells and all are inter
related..

So, when the value of C5 changes, I need the contents in F5, F7 & C7 to the
cleared.. and when value of when C8 changes, contents in F8 to the cleared..
Healp pls

All the above cell have in-cell drop down validation.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Clear value if cell changes

Hope this works for you...


Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$C$5" Then
Range("F7").ClearContents
Range("F5").ClearContents
Range("F7").ClearContents
End If
End Sub
--

Tech Whiz Tom
MS Access / Excel Applications Analyst


"Kashyap" wrote:

Hi, I have in cell drop down validation in around 8 cells and all are inter
related..

So, when the value of C5 changes, I need the contents in F5, F7 & C7 to the
cleared.. and when value of when C8 changes, contents in F8 to the cleared..
Healp pls

All the above cell have in-cell drop down validation.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Clear value if cell changes

Another one:

Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
If not (intersect(target, me.range("c5") is nothing) then
me.range("f5,f7,c7").clearcontents
end if
if not (intersect(target, me.range("c8") is nothing) then
me.range("F8").clearcontents
end if
End Sub




Kashyap wrote:

Hi, I have in cell drop down validation in around 8 cells and all are inter
related..

So, when the value of C5 changes, I need the contents in F5, F7 & C7 to the
cleared.. and when value of when C8 changes, contents in F8 to the cleared..
Healp pls

All the above cell have in-cell drop down validation.


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,069
Default Clear value if cell changes

try somthing this:

Private Sub Worksheet_Change(ByVal Target As Range)

If Target.Address = "$C$5" Then

Range("F7,F5,C7").ClearContents

ElseIf Target.Address = "$C$8" Then

Range("F8").ClearContents

End If

End Sub

--
jb


"Kashyap" wrote:

Hi, I have in cell drop down validation in around 8 cells and all are inter
related..

So, when the value of C5 changes, I need the contents in F5, F7 & C7 to the
cleared.. and when value of when C8 changes, contents in F8 to the cleared..
Healp pls

All the above cell have in-cell drop down validation.

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
Transfer a name from one cell to another but leave clear if clear? Scoober Excel Worksheet Functions 3 May 22nd 09 02:55 AM
Clear Method not working for a ListBox clear scott56hannah Excel Programming 4 February 14th 08 08:42 PM
Create a Clear button to clear unprotected cells Jcraig713 Excel Programming 2 November 26th 07 03:55 PM
clear the clear the web page email attachment lines MCrider Excel Discussion (Misc queries) 0 November 11th 07 10:05 PM
Type into one cell and automatically clear contents in another cell Bo Excel Programming 4 September 29th 03 06:04 PM


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