+ Reply to Thread
Results 1 to 2 of 2

RE:conditionally-highlight-cells-in-one-column-based-on-text-values-in-another-column

  1. #1
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,601

    RE:conditionally-highlight-cells-in-one-column-based-on-text-values-in-another-column


    I have a question regarding this thread.
    http://www.excelforum.com/excel-prog...er-column.html
    When the formula"
    Please Login or Register  to view this content.
    is pasted into various columns in Doug's worksheet, it gives the correct true/false values but when inserted into conditional formatting, it does not apply any format. Does anyone know why?
    Last edited by protonLeah; 09-19-2009 at 09:41 PM. Reason: reply=sat
    Ben Van Johnson

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: conditionally-highlight-cells-in-one-column-based-on-text-values-in-another-colum

    Not quite sure why it doesn't work.....but I don't think it needs to be that complex.

    Rather than using COLUMN() and ROW() the standard practice would be to just refer to cells specifically, e.g. no need for the test COLUMN()=MATCH("Paper",A$1:Z$1,0), assuming there is only one column with the header "Paper" which is the case here, I think. Then, assuming the conditional formatting is in, say V4, you can just do a direct comparison to the cell in question, i.e. V$1="Paper".

    Also you don't need to use INDIRECT(ADDRESS type constructions, INDEX is better.

    In view of the above you could apply conditional formatting to the whole range beginning at B2 with this formula

    =AND(A$1="Paper",OR(INDEX($A2:$Z2,MATCH("writing tool",$A$1:$Z$1,0))="Pen",INDEX($A2:$Z2,MATCH("writing tool",$A$1:$Z$1,0))="Pencil"))

    which works for me.......

+ 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