delete A2 when A1 deleted or cleared

B

Bill

Hi all,

I'm new to excel programmingmm but I'm sure there must be a way to
do this.

I need to have the contents of cell A2 deleted or cleared with the
contents of cell A1 are deleted or cleared. Any suggestions?

Thanks in advance
Bill
 
C

CyberTaz

Hi Bill -

Unless your example *greatly* oversimplifies what you are trying to
accomplish, why not just select cells A1 & A2 (by dragging, perhaps), then
press Delete?

If there is more to your question, the reply may revolve around exactly what
the cells contain, where they are located relative to one another, etc.
Please provide more specific detail so someone can give you an appropriate
response.
 
B

Bill

Sorry - the cells actually are on different worksheets (but in the same
workbook) - I tried to simply the question ;-).

so, I' d like to delete the contents of Sheet2!A2 when Sheet1!A1 is
deleted.

Thanks!
 
C

CyberTaz

Hi Bill -

I'm still not clear on what your actual *goal* is, but it is rather unusual
to have data entered on one sheet yet have it deleted based on deleting
content on a different sheet. Although it can most likely be done with VBA,
it would be quite helpful to know the purpose & the correlation between the
2 sheets - there may be a more direct approach.

Another simple option if the sheets *are* consecutive & the same respective
cells need to have their content deleted, you can click the tab for sheet 1,
shift-click the tab for sheet 2, then select cell A1 & press Delete. The
content of A1 on each sheet will be deleted.

If the sheets *aren't* consecutive, select the first, Cmd+click the second,
then delete the content of a selected cell or range. The content will be
deleted from the corresponding cells on each selected sheet, but any sheets
in between will not be affected.

If this won't get it done for you, more detail is needed for me to offer any
other suggestions. Perhaps Bob G. or one of the others has some additional
ideas.
 
P

PhilD

CyberTaz said:
I'm still not clear on what your actual *goal* is, but it is rather unusual
to have data entered on one sheet yet have it deleted based on deleting
content on a different sheet. Although it can most likely be done with VBA,
it would be quite helpful to know the purpose & the correlation between the
2 sheets - there may be a more direct approach.


It sounds to me that Bill wants one cell to return a blank when another
is blank. If that is correct and I'm not overcomplicating things, then
an if statement will do the trick.

Something like:

=if(a1=0,"","not blank")

or similar.

Any help?

PhilD
 
B

Bill

Hi guys

Thanks for thinking about this and sorry for the lac k od detail. Phil
is right, but I can't enter a formula into the cell since the cell will
contain data that will be entered. I also need to do this for several
cells - So, when the contents of Sheet1!A1 is deleted, the contents of
Sheet2!A1 is deleted; when Sheet1!A2 is deleted Sheet2!A2 is deleted
and so forth. Its not more complicated than that.

The reason for this is I'm creating a workbook that contains related
(not in a database sense) information on one sheet (Sheet1) to that on
the other (Sheet2). If the data in Sheet 1 is deleted, I'd like to have
an easy way to remove the corresponding data in Sheet2, without having
to go to Sheet2 to delete it manually.

I suspect VB is the way to do this (with relative references), but I
have no experience with VB at all and was hoping that the code would be
simple enough for a knowledgeable person to type out an example. If
its too complicated, I'll just include a note on worksheet for the user
to remove the data manually.

By the way - "Bob G" is also replying to this in a separate post (I'm
not sure how two posts were made on this topic)

Thanks!
Bill
 
P

PhilD

Bill said:
Hi guys

Thanks for thinking about this and sorry for the lac k od detail. Phil
is right, but I can't enter a formula into the cell since the cell will
contain data that will be entered. I also need to do this for several
cells - So, when the contents of Sheet1!A1 is deleted, the contents of
Sheet2!A1 is deleted; when Sheet1!A2 is deleted Sheet2!A2 is deleted
and so forth. Its not more complicated than that.

Maybe a LOOKUP function will work here? You'd need separate "input"
and "result" cells.

If this will work, then I am sure that an expert will be along shortly
to expound further (I'm somewhat hazy on lookups).

PhilD
 
P

Paul Berkowitz

By the way - "Bob G" is also replying to this in a separate post (I'm
not sure how two posts were made on this topic)

The two threads were made by YOU. You posted the same question twice, except
that in one case you asked to delete A2 whereas in the other case you asked
to delete B1. You should have just asked once, and all replies would be in
the same thread.

--
Paul Berkowitz
MVP MacOffice
Entourage FAQ Page: <http://www.entourage.mvps.org/faq/index.html>
AppleScripts for Entourage: <http://macscripter.net/scriptbuilders/>

Please "Reply To Newsgroup" to reply to this message. Emails will be
ignored.

PLEASE always state which version of Microsoft Office you are using -
**2004**, X or 2001. It's often impossible to answer your questions
otherwise.
 

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