conditional formating

  • Thread starter Thread starter nk
  • Start date Start date
N

nk

how to change the color of the font if the day is Sunday?

( i tried the following formating and it dIdn"t work:
CELL VALUE IS "EQUAL TO" =WEEKDAY(A7,1)=1

nk
 
Try changing Condition 1 to Formula Is before adding that formula

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
thx Toppers
I used the same formula in the conditional formating Condition 1
formula box and it didnt work
(the date it the cell is changing all the time hince I need to use the
coditional formating to know which day of the week it is)
nk

Toppers :
 
Try the FormulaIs option this way...

=WEEKDAY(A1:A20,1)=1

Adjust your range to suit your conditions.

Rick
 
I don't think so. You select multiple cells and only address the first
selected.

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
You are right, of course. But as a result of my mistake, I notice something
odd about Conditional Formatting. My test case was to use this formula in
the FormulaIs field...

=WEEKDAY(A8:A20,1)=1

and it highlighted the correct dates for the cells I had filled in. But my
selection of A8 as a starting point was a "lucky" fluke. I just went back
and changed the starting cell to A4 and incorrect dates were highlighted! It
is as if the WEEKDAY function was calculated for A1 and then the difference
between the cell specified and A1 were used to move the result down that
many cells. Stated another way, it looks like using A4 made Conditional
Formatting assume A1 was located 4 cells below the start of the grid. Seems
like a strange action to me. Have you (or anyone else) seen this before and,
if so, do you have an explanation for it? Is it a documented "feature"?

Rick
 
Conditional formatting always works relative to the activecell, which it is
important why the activecell should be the first cell in the range when
selecting multiple cells.

As to why WEEKDAY with a range of cells works, I can only surmise it is
because an array formula always returns just the first value if just entered
in a single cell, that is not properly resolved. For instance, if you have
July 1, Jul 2, etc in A8:A20, and enter this array formula in a cell

=IF(A8:A20>TODAY(),A8:A20)

you get FALSE, as the first returned value in that array of results is
FALSE.

So the WEEKDAY(A8:A20,1) will resolve to the weekday for A8, then for A9.

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
Back
Top