+ Reply to Thread
Results 1 to 9 of 9

Duplicate Conditional Formatting; Stored value

  1. #1
    Registered User
    Join Date
    11-28-2012
    Location
    NA
    MS-Off Ver
    Excel 2013
    Posts
    34

    Duplicate Conditional Formatting; Stored value

    I have a macro that will conditional format all cells that include "cw_". If I run the macro, it will run without issue, but there will be two exactly the same conditional formats and so forth. Is there a way to check stored values against the one I want to run and if it already exists exit the code?


    Please Login or Register  to view this content.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,705

    Re: Duplicate Conditional Formatting; Stored value

    I have to ask why are you doing this with VBA. The rule itself is conditional upon the cell having cw_, so I wonder why you would have code that applies the rule to those cells.

    It would be helpful to attach your file so we can see all of your code and get a better idea of what you are trying to do. The paper clip icon does not work for attachments. To attach a file, under the text box where you type your reply click the Go Advanced button. On the next screen scroll down and click on Manage Attachments, which will show a pop-up window to Select and Upload a file. Then close the window.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,705

    Re: Duplicate Conditional Formatting; Stored value

    By the way, the AND in that formula is superfluous because there is only one condition inside the AND parentheses.

  4. #4
    Registered User
    Join Date
    11-28-2012
    Location
    NA
    MS-Off Ver
    Excel 2013
    Posts
    34

    Re: Duplicate Conditional Formatting; Stored value

    It is for reviewing purposes. Anyone reviewing the workpaper needs to easily see which cells include a cw_ formula which is pulling information from CaseWare software. The reason for using a conditional formatting is so that it can be applied quickly without editing information on the sheet.

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    11-28-2012
    Location
    NA
    MS-Off Ver
    Excel 2013
    Posts
    34

    Re: Duplicate Conditional Formatting; Stored value

    Quote Originally Posted by 6StringJazzer View Post
    By the way, the AND in that formula is superfluous because there is only one condition inside the AND parentheses.
    I probably had another criteria in there at one point and just left it as is.

  6. #6
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,705

    Re: Duplicate Conditional Formatting; Stored value

    I am not asking why you want conditional formatting, I am asking why you want to use VBA to apply it.

  7. #7
    Registered User
    Join Date
    11-28-2012
    Location
    NA
    MS-Off Ver
    Excel 2013
    Posts
    34

    Re: Duplicate Conditional Formatting; Stored value

    Removing duplicate conditional formatting? So that it's a one-click solution alongside what I've already explained. If it isn't possible, then please just say so.

  8. #8
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,705

    Re: Duplicate Conditional Formatting; Stored value

    I think we are talking past each other. It is possible to achieve the formatting you want by setting up a single conditional formatting rule that applies to your cells without using VBA at all.

    It's possible to use VBA to remove duplicated conditioning formatting rules, but using VBA to manage conditional formatting is complicated, and searching every possible range to identify duplicate rules is even more so. If you are determined to do that I can help but need your file with sample data and cases of duplicated CF rules to be able to reproduce exactly what you are doing.

  9. #9
    Registered User
    Join Date
    11-28-2012
    Location
    NA
    MS-Off Ver
    Excel 2013
    Posts
    34

    Re: Duplicate Conditional Formatting; Stored value

    Through the Conditional Formatting tab, under styles? That's how I started and realized I didn't want to do that every single time, hence the VBA automation. For each project I can review dozens of Excel files that need this. It's also something that will probably be shared with peers at some point using a custom ribbon button. I want it to be simple for them to use as well.

    I personally use VBA to automate and reduce/simplify monotonous work. I've learned primarily through recording and editing, so I don't know VBA's limitations.

    If it's too complicated, I'll just continue to use the Manage Rules... option. I'm not sure, but I'd assume that the odds are in my favor that there are no other CF's in workpapers that I'll be viewing, so I can just clear all and run my code.

+ 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. [SOLVED] Conditional Formatting for duplicate from 4 column
    By HaroonSid in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-11-2014, 10:16 AM
  2. [SOLVED] Conditional Formatting for duplicate from 4 column
    By HaroonSid in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-11-2014, 10:16 AM
  3. Duplicate Conditional Formatting
    By jbtenor1 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-20-2014, 11:14 AM
  4. [SOLVED] Conditional formatting of duplicate rows (not duplicate cells)
    By ExcelStefan in forum Excel General
    Replies: 2
    Last Post: 06-19-2012, 06:09 AM
  5. Conditional formatting for duplicate values
    By kris26 in forum Excel - New Users/Basics
    Replies: 12
    Last Post: 03-21-2012, 06:51 AM
  6. duplicate conditional formatting
    By detlion1643 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-02-2009, 01:11 PM
  7. How can I duplicate conditional formatting
    By Jeff in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-18-2006, 04:35 PM

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