HELP WITH AN EXCEL "VBA" CODE PLEASE !?

Home > Computers & Internet > Software > HELP WITH AN EXCEL "VBA" CODE PLEASE !?
WayneWayne


Hi.

I would like a VBA code what will do the following please:

If cell H2 equals 2.10, then I would like for cells C1, D2, F3 to be cleared of its contents, then after it has done that, (and only after it as done that) I would then like for cell H10 to be cleared of its contents.

Many Thanks

WAYNE

pete l
pete l

Copy this to the VBA for the sheet where you want it to happen

Private Sub Worksheet_SelectionChange(ByVal Target As Range)

If ActiveSheet.Range("H2") = 2.1 Then

ActiveSheet.Range("C1").Value = ""

ActiveSheet.Range("D2").Value = ""

ActiveSheet.Range("F3").Value = ""

ActiveSheet.Range("H10").Value = ""

End If

End Sub


Other Questions & Answers

Need help with Python program?
Trying to help my brother who has just started learning Python at school. He's not the brightest so any help is appreciated. I consider this quit ... Read more (1 answers)
Problem with my laptop, please help it nothing major?
I picked up my laptop and pressed a key on accident, and now my none of my tabs, address bar wont show up, and search bar, mostly the whole thing on t ... Read more (1 answers)
What is this song http://www.youtube.com/watch?v=GzkbFnBozIQ?
Please tell me if you know :) ... Read more (3 answers)
Does the dazzle pinnicle work on windows 7?
I am getting a dazzle pinnicle (white) and I was wondering whether it is naturally compatible with windows 7. ... Read more (1 answers)
How can I report someone over youtube?
I am constantly being harassed by a user on youtube, harassed on my page and on other people video comments, and he just wont leave me the hell alone, ... Read more (2 answers)