+ Reply to Thread
Results 1 to 7 of 7

Macro for clear content of cells depend on the Conditions

  1. #1
    Registered User
    Join Date
    03-18-2015
    Location
    London
    MS-Off Ver
    2012
    Posts
    1

    Macro for clear content of cells depend on the Conditions

    Hi All

    I am having a issue for creating a Macro for clear data and the format in cells depend on the condition.

    Particular cell range in work sheet having different formats.This is a sheet for daily rota and display lunch hour and other work.different staff members have different time scales.

    I want to write a macro to clear data and format in a3:aa9 where cell value not equal "1" or "Lunch".


    I appreciate if someone can help me for this please.

    Thank you
    Chani

  2. #2
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Macro for clear content of cells depend on the Conditions

    Maybe:

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    05-01-2013
    Location
    Devon, England
    MS-Off Ver
    Excel 2003
    Posts
    128

    Re: Macro for clear content of cells depend on the Conditions

    hi John,
    I tried this, but got the error "400". Any ideas?

  4. #4
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Macro for clear content of cells depend on the Conditions

    No? Works for me, and I can't reproduce the error. However, I am only running from the VBE. 400 means Form already displayed. My guess is it is caused by another part of your code.

  5. #5
    Forum Contributor
    Join Date
    05-01-2013
    Location
    Devon, England
    MS-Off Ver
    Excel 2003
    Posts
    128

    Re: Macro for clear content of cells depend on the Conditions

    Cleared the error I was getting, but it clears the whole range. What would be the code to only delete the rows with the conditions in?

  6. #6
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Macro for clear content of cells depend on the Conditions

    Nick. Might I suggest that you start your own thread. I doesn't seem right to post and repost to the thread of another who is also looking for an answer.

  7. #7
    Forum Contributor
    Join Date
    05-01-2013
    Location
    Devon, England
    MS-Off Ver
    Excel 2003
    Posts
    128

    Re: Macro for clear content of cells depend on the Conditions

    John, sorry, I got carried away

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 3
    Last Post: 03-21-2015, 02:05 AM
  2. [SOLVED] How to clear two comboboxes that depend on each other values.
    By pietras152 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-09-2013, 08:32 PM
  3. Replies: 2
    Last Post: 08-28-2011, 02:39 AM
  4. macro to clear content
    By kaffal in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-14-2009, 11:41 PM
  5. [SOLVED] Clear Cells Content
    By No_Spam in forum Excel General
    Replies: 2
    Last Post: 08-20-2006, 11:05 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1