Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2012

    Unanswered: VB code to conditionally format cells EXCEL

    Hi folks,

    I am posting here because the quality of the responses are always excellent - and i need some help solving this problem.

    I would like to use VB code to conditionally format rows based on some specific conditions:

    The cells in column C will contain a string of text.

    Based on this; If the word ‘APPLES’ appears in that string of text and the word “LOCATION” appears in cell M
    Cell E needs to be shaded red – whilst the rest of the cells of that row are shaded blue.

    Obviously if the conditions are not met the formatting does not take place.

    Could anyone advise on how to achieve this using vb code?

    any help greatly received!

  2. #2
    Join Date
    Apr 2004
    Derbyshire, UK
    Provided Answers: 2

    You do not say how, where or when you want any VB code to run, but you could do this with conditional formationg by using this as the rule/criteria in cell E2


    If either word is not found then the Search function returns #Value error which, it would appear, is interpreted as false and hence no formatting is applied.



Tags for this Thread

Posting Permissions

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