+ Reply to Thread
Results 1 to 2 of 2

Macro to highlight cells based on content

  1. #1
    JimDerDog
    Guest

    Macro to highlight cells based on content

    I have a spreadsheet generated by an Access query being exported. It lists
    names down the first column, then has 5 columns, some cells in these columns
    are blank, some with "1" in them, some with "2", some "3", and some "4".
    I need to highlight cells with any number greater than 1, or any two
    adjoining cells in a single row that have greater than or equal to "1" in
    them.
    I presume that this would require some sort of conditional formatting - I
    can probably do the first but struggle with the 2 adjoining cells bit.
    The other complication is that this spreadsheet is produced on a weekly
    basis so it would be very useful if the process of highlighting could be
    automated in a macro so we open the spreadsheet, run the macro and the
    appropriate cells are highlighted.

  2. #2
    vezerid
    Guest

    Re: Macro to highlight cells based on content

    The following condition will highlight all cells with the conditions
    that you specified.

    =OR(B2>1, AND(B2>=1, B3>=1))

    To apply:

    Select the 5 columns
    Format|Codnitional Formatting...
    Choose Formula Is
    Enter the formula
    CHoose the conditional format.

    I am not aware that an import would reset all conditional formatting.
    But if so, use the Macro Recorder (Tools|Macro|Record New Macro) before
    you perform the above steps and reapply the recorder macro whenever
    there is a new import.

    HTH
    Kostis Vezerides


+ 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