+ Reply to Thread
Results 1 to 9 of 9

Strange. Conditional Formatting won't go away. Help.

  1. #1
    Registered User
    Join Date
    05-30-2013
    Location
    America
    MS-Off Ver
    Excel 2010
    Posts
    14

    Strange. Conditional Formatting won't go away. Help.

    I'm building a timesheet (see attached). You'll notice that in the first day box (July 1) there is no conditional formatting. There use to be, but I deleted it. but when you click the AUTO button (lower right corner of July 1 box). the darn conditional formatting reappears. For the life of me I can't figure out why. I want it gone for good.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    01-12-2007
    Location
    New Jersey
    Posts
    2,127

    Re: Strange. Conditional Formatting won't go away. Help.

    The macro is copying the cells C3:C8 from sheet Auto Hours. These cells contain a conditional format, so when you copy them, you also copy the conditional format.

    Consider deleting the Conditional Format on the AutoHours sheet and see if it helps

  3. #3
    Registered User
    Join Date
    05-30-2013
    Location
    America
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: Strange. Conditional Formatting won't go away. Help.

    Thanks, I did not see the formatting on sheet Auto Hours. One problem though, the macro assigned to the AUTO button copies not just the cell values from sheet Auto Hours, but it also copies the conditionl formatting. How do I reword the VBA so that that it does a Paste Special Value Only job. So that the conditional formatting, as well as data validation rules, on my timesheet are not changed when the Auto button is clicked.

  4. #4
    Forum Expert
    Join Date
    01-12-2007
    Location
    New Jersey
    Posts
    2,127

    Re: Strange. Conditional Formatting won't go away. Help.

    Does this do the trick?

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    05-30-2013
    Location
    America
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: Strange. Conditional Formatting won't go away. Help.

    I typed that in but got a compile error. So I tried adding a period before "xlPasteValues" and it got rid of the compile error. But now when I run the macro I get this error

    error msg.jpg

    I disagree witht he error msg. They are the same size and shape.

  6. #6
    Forum Expert
    Join Date
    01-12-2007
    Location
    New Jersey
    Posts
    2,127

    Re: Strange. Conditional Formatting won't go away. Help.

    Can you repost the workbook with the amended code (that is giving you the new errror)?

    I ran the code on my end and had no problems.

  7. #7
    Registered User
    Join Date
    05-30-2013
    Location
    America
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: Strange. Conditional Formatting won't go away. Help.

    File attached
    Attached Files Attached Files

  8. #8
    Forum Expert
    Join Date
    01-12-2007
    Location
    New Jersey
    Posts
    2,127

    Re: Strange. Conditional Formatting won't go away. Help.

    It works. You wont need the period before xlPasteSpecialValues. However, keep the copy line of code and the paste line of code in separate lines in the compiler.

    So, instead of
    Please Login or Register  to view this content.
    Use
    Please Login or Register  to view this content.
    Note, in the correct code, they are in 2 separate lines (separated by pressing the ENTER key).

    Let me know if this helps

  9. #9
    Registered User
    Join Date
    05-30-2013
    Location
    America
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: Strange. Conditional Formatting won't go away. Help.

    That works like a charm. Thanks. My, what a difference a single key stroke makes.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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