Results 1 to 8 of 8

Thread: Can this Conditional Formatting Code be simplified

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #4
    Knowledge Base Approver VBAX Wizard p45cal's Avatar
    Joined
    Oct 2005
    Location
    Surrey UK
    Posts
    5,970
    I've managed to lose about 15 of the CFs by having the first CF colouring red any row that contains 100 in column Z and stopping if TRUE, then deleting all the others which referred to 100 in column Z.
    In the attached I have constructed a table of all combinations:
    Capture3.JPGwhere:
    • there's a letter r/a/g if you've got an explicit CF for a particular combination,
    • filled with the colour that actually shows with your CFs (with one exception),
    • a question mark just wondering if that combination should be green?


    The exception is where I've put r shows a which means you may have a CF intended to show red there but it in fact shows amber.

    The first thing I noticed is that the first 2 colmns were all red regardless of what was in column J.(Implemented)
    Where there are similar r/a/g patterns in rows, theoretically you should be able to combine them (Not implemented):
    ServiceRequest-1.1,ServiceRequest-1.2,ServiceRequest-2.1
    ServiceRequest-3.1,ServiceRequest-3.2, and possibly also with ServiceRequest-3.3.

    To help test I added rows to Raw Data from row 296 down of all combinations in the table, with the original colour in words in column I.
    In VBA there's a new Module 4 which is a copy of your Module 1 with the very last CF in the module adjusted for the 100s and commented out some 15, now unnecessary, CFs.
    Attached Files Attached Files
    p45cal
    Everyone: If I've helped and you can't be bothered to acknowledge it, I can't be bothered to look at further posts from you.

Posting Permissions

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