Conditional Format Formula Question

D

Dudley

I have a spreadsheet with a string of dates in adjacent cells and need to
shade Saturday and Sunday. Having done a Google search I found the function
=AND(WEEKDAY(A1,2)>5,A1<>"")
to use with conditional formatting. My concern is that I dont understand
the last part of the function A1<>"" and am reluctant to give it to one
of my users if I dont understand completely.
Would some kind soul please explain this for me.

Thanks
Dudley
 
J

Jack Schitt

Your confusion is justified.
the test A1<>"" tests for whether A1 contains a blank text string. However
if the condition WEEKDAY(A1,2)>5 returns a result TRUE then the test A1<>""
must always return a result TRUE, so the second test is superfluous. You
might as well enter
=WEEKDAY(A1,2)>5
to have the same effect
 
P

papou

Hello Dudley
This will check if A1 is NOT empty
eg :
A1 <> "" means A1 is not empty
A1 = "" means A1 is empty

HTH
Cordially
Pascal
 
F

Frank Kabel

Hi
this part just checks that the cell A1 is not empty. Lets
assume cell A1 is empty and you enter the formula
=WEEKDAY(A1)
in your spreadsheet. This returns '7'. so to prevent that
empty cells are shaded as well the second part is added
 
J

Jack Schitt

I stand corrected by Frank

Jack Schitt said:
Your confusion is justified.
the test A1<>"" tests for whether A1 contains a blank text string. However
if the condition WEEKDAY(A1,2)>5 returns a result TRUE then the test
 
Top