I need a code that will recognize when D5 is blank that it will delete / empty the contents of E5 automatically (and so on for D6 and E6). I want it to occur for D5:E6 thru D41:E41.
Thanks,,,
I need a code that will recognize when D5 is blank that it will delete / empty the contents of E5 automatically (and so on for D6 and E6). I want it to occur for D5:E6 thru D41:E41.
Thanks,,,
Hi,
This code will do what you want. You will need to adjust the sheet reference as required.
![]()
Please Login or Register to view this content.
Rule 1: Never merge cells
Rule 2: See rule 1
"Tomorrow I'm going to be famous. All I need is a tennis racket and a hat".
thanks for the reply. Where do i place the code? It's not working so i may be doing something wrong....
"Delete" sounds like an action and not a calculation. In this forum we are looking to solve things with worksheet formulas.
Do the cells you want emptied have values in them or formulas? If formulas, we can adjust the formula to stay visually "blank" when D5 is empty. Like so:
E5:
=IF(D5="", "", yourcurrentformula)
If you want values to get removed, you'd need to post your question and a sample worksheet in the Programming forum.
EDIT: Sorry, sweep has offered a programming solution. Although it's not automatic and only applies to one row, it is a start in the direction you've described.
_________________
Microsoft MVP 2010 - Excel
Visit: Jerry Beaucaire's Excel Files & Macros
If you've been given good help, use theicon below to give reputation feedback, it is appreciated.
Always put your code between code tags. [CODE] your code here [/CODE]
?None of us is as good as all of us? - Ray Kroc
?Actually, I *am* a rocket scientist.? - JB (little ones count!)
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks