data deletion question

M

Mike Hyndman

I have a name in cell A10 with values in C10 & G10. Is it possible to
delete the info in cells C10 and G10 when the name in A10 is removed?
TIA
MH
remove _bats_ to reply
 
J

Jason Morin

Right-click the worksheet tab, View Code, and paste this into the window

Private Sub Worksheet_Change(ByVal Target As Excel.Range
If Not Intersect(Target, Range("A10")) Is Nothing The
If Len(Target) = 0 The
Range("C10,G10").ClearContent
End I
End I
End Su

HT
Jaso
Atlanta, G
 
M

Mike Hyndman

Jason,
Perfect! many thanks.
Sadly, as one solution is found, other applications for similar present
themselves,(such is life :cool:) so would it be possible to modify your
solution so that any cell in, say, column A, when deleted, would remove
any values from the same row in columns M & O. I've been playing around
with wildcards and offsets without success.
again, many thanks.
Mike H

remove _bats_ to reply
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top