Macro to delete cell contents based on other cell contents

SJCrawley

New Member
Joined
Jun 3, 2021
Messages
2
Office Version
  1. 2010
Platform
  1. Windows
Hi Everyone,
I would appreciate assistance with the following problem if possible.
I require a Macro that will clear the contents of cells in row BD8:BI8 when the corresponding cell AT8 is either blank or zero (0). As soon as cell AT8 contains a value greater than zero (0) then any contents in cell range BD8:BI8 must remain undeleted.
I require the same functionality to apply to all subsequent rows up to BD40:BI40 when the corresponding cell AT40 is subject to the conditions outlined above.
Is there a solution?
Thanks Very Much. SC
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).

Larry Haydn

Board Regular
Joined
Jul 18, 2019
Messages
186
Office Version
  1. 365
Platform
  1. Windows
This sounds like a very risky proposition.
You can use a Worksheet_Change event to do this.
However, if you inadvertently delete the content in AT8 or AT40, the data will be deleted without your intervention.
 
Upvote 0

Peter_SSs

MrExcel MVP, Moderator
Joined
May 28, 2005
Messages
58,487
Office Version
  1. 365
Platform
  1. Windows
Welcome to the MrExcel Message Board!

Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Be sure to follow & read the link at the end of the rule too!

Cross posted at: Macro to delete cell contents based on other cell contents
If you have posted the question at more places, please provide links to those as well.

If you do cross-post in the future and also provide links, then there shouldn’t be a problem.
 
Upvote 0

SJCrawley

New Member
Joined
Jun 3, 2021
Messages
2
Office Version
  1. 2010
Platform
  1. Windows
Hi,
How do you know that a User has posted the same question on multiple forum sites?
 
Upvote 0

Peter_SSs

MrExcel MVP, Moderator
Joined
May 28, 2005
Messages
58,487
Office Version
  1. 365
Platform
  1. Windows
There are people help on multiple forums and they tend to notice if the same post comes up. Since it is a rule/request on virtually all forums that you let others know if you cross-post it generally gets brought to the attention of moderators. If you haven't done so already, reading the link at the end of our rule #13 will explain why forums want to know about cross-posts.
 
Upvote 0

Forum statistics

Threads
1,186,389
Messages
5,957,566
Members
438,310
Latest member
rocketemm

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top