Results 1 to 3 of 3
  1. #1
    Join Date
    May 2005
    Posts
    129
    Provided Answers: 1

    Question Answered: VBA Function to change the colour of cell dependent on cell contents vs Named Range

    Hi I need some help please

    In he attached example sheet, I have a tab "Supplier refs", columns A - C have a named range
    In the other tab "Wiper" In column A is the list of suppliers

    I need some a function to loop through column A in (Wiper) check the cell contents and reference each cell against the named ranges and colour accordingly as per the example in column B

    Regards

    Mark

    Example.zip

  2. Best Answer
    Posted by weejas

    "Attachment 17226
    Use conditional formatting. I selected A2-A10 on sheet Wiper, and created the following formatting rules:
    Code:
    =AND(NOT(ISERROR(MATCH(A2, AmberRef, 0)))) - fills cells orange
    =AND(NOT(ISERROR(MATCH(A2, GreenRef, 0)))) - fills cells green
    =AND(NOT(ISERROR(MATCH(A2, RedRef, 0)))) - fills cells red
    "


  3. #2
    weejas is offline Grumpy old man (training)
    Join Date
    Sep 2006
    Location
    Surrey, UK
    Posts
    1,102
    Provided Answers: 17
    Example.zip
    Use conditional formatting. I selected A2-A10 on sheet Wiper, and created the following formatting rules:
    Code:
    =AND(NOT(ISERROR(MATCH(A2, AmberRef, 0)))) - fills cells orange
    =AND(NOT(ISERROR(MATCH(A2, GreenRef, 0)))) - fills cells green
    =AND(NOT(ISERROR(MATCH(A2, RedRef, 0)))) - fills cells red
    10% of magic is knowing something that no-one else does. The rest is misdirection.
    Beers earned: 2

  4. #3
    Join Date
    May 2005
    Posts
    129
    Provided Answers: 1
    Thank you Cheers

Posting Permissions

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