Conditional Format Formula Question

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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
 
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
 
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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top