Hello there,
just made an account freshly, for I have a question. I have a problem with conditional formatting.
I have a table used to keep track of presence in class, and it has a row with dates which has date-format values. What I want is to highlight a column which corresponds with the current date. I used this formula in conditional formatting, which worked:
=TODAY() = INDIRECT(ADDRESS(5;COLUMN())) - the dates are always in 5th row, and the date is written at the top of the column(in row 5), hence I used the INDIRECT function to determine which cell to check the TODAY() date against. That is all clear to me.
Now the problem is when I try to expand on this formula. I want to have 2 different highlight colors depending on a cell($D$3), who's value will contain a certain string. Let's say I want the highlight to be blue when the cell contains string "Fast", and orange when it contains string "Last". For other reasons, I want to check if those strings are contained anywhere within the cell, so instead of using a pure '$D$3="Fast"' comparison, I decided on using:
=ISNUMBER(SEARCH("Fast";$D$3)) - the SEARCH outputs the index number where the string starts if it is found in the specified($D$3 in this case) cell, and then I get the 'TRUE/FALSE' using ISNUMBER - if SEARCH outputs number, it obviously found the string inside the cell, and if it doesn't, it returns '#VALUE!', which I'm guessing is a sort of NULL value(it actually doesn't matter for my case). Long story short, this formula outputs TRUE if a cell contains the wanted string, and FALSE if it is not contained inside the string. Again, this formula works.
I then go ahead, and combine these two formulas to get this:
=AND((TODAY() = INDIRECT(ADDRESS(5;COLUMN()))); ISNUMBER(SEARCH("Fast";$D$3))) - what this formula does is outputs TRUE only if the cell $D$3 contains string "Fast" and the column header(again, in row 5) contains the current date. This formula, when inserted into the sheet on any cell WORKS - so it works as intended. The problem appears when I use this formula in the conditional formatting - it simply doesn't work.
Again, I'm trying to highlight cell in a column whose header's date is today's date, and I want the colour to be different based on a separate cell.
I tried using just the date checking formula, and it worked. I tried using just the string-in-cell checking formula, and it worked, but when I combine the 2 into a single formula, which has been tested and it outputs TRUE and FALSE as expected, it suddenly doesn't work.
Bookmarks