• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

VBA to clear contents based on criteria being met

Caesar

New Member
I am new to VBA and want to write a macro for the following:

If cell B2 is blank then clear contents from cells F2:F3. If cell B2 has a value then do nothing. The same has to be done for B6 and F6:F7 and for other specific cells in the worksheet.
Any help is appreciated.
 

Attachments

  • Sample workbook.xlsx
    12.5 KB · Views: 6
Caesar
One sample of that ...
Hi vletm, thank you for your response.
Unfortunately that does not seem to work the way I intended.
When the value in B2 changes to a blank cell, the cells B6:B7 must automatically get cleared (without using a control button).
 
Caesar
Did You mention before:
the cells B6:B7 must automatically get cleared (without using a control button).?
I could not read that from You mind!
It worked as a sample, which needed to 'trigger' someway.
 

Attachments

  • Sample workbook.xlsb
    17.9 KB · Views: 2
Caesar
Did You mention before:
the cells B6:B7 must automatically get cleared (without using a control button).?
I could not read that from You mind!
It worked as a sample, which needed to 'trigger' someway.

Hi vletm
Apologies the first post was not clear what had to be done.
Thank you for your assistance.
 
Back
Top