ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Conditional formats for date Serial Numbers (https://www.excelbanter.com/excel-programming/424147-conditional-formats-date-serial-numbers.html)

Buro AP

Conditional formats for date Serial Numbers
 
Hi,

I want some cells to turn gray if the data contained therein is a date
number such as 39485. How do I create a condition that can determine that?
I was able to get it to work when the cell was filled with a text "Sat" or
"Sun", but now that I've managed to have the actual serial number display as
"Sat" and "Sun" the condition no longer applies because the returned value is
a number and not text.
--
Earn extra cash from your computer!
Visit http://24hourwebcash.com/curiale1234

God Bless,

Tony

Dave Peterson

Conditional formats for date Serial Numbers
 
If the value in A1 is a date (a real number), then you could use this kind of
conditional formatting formula to check to see if it is Saturday or Sunday:

=WEEKDAY(A1,2)5



Buro AP wrote:

Hi,

I want some cells to turn gray if the data contained therein is a date
number such as 39485. How do I create a condition that can determine that?
I was able to get it to work when the cell was filled with a text "Sat" or
"Sun", but now that I've managed to have the actual serial number display as
"Sat" and "Sun" the condition no longer applies because the returned value is
a number and not text.
--
Earn extra cash from your computer!
Visit http://24hourwebcash.com/curiale1234

God Bless,

Tony


--

Dave Peterson

Buro AP

Conditional formats for date Serial Numbers
 
Thanks Dave. Your formula returned TRUE. I read and experimented a little
more and came up with this:

=TEXT(B2,"ddd") Where B2 contains my reference date. The resultant text
was able to trigger the conditional cell formatting of gray for "Sat" or
"Sun". Subsequent cells add 1 to the previous cell value thus:

=TEXT((B2+1),"ddd"); =TEXT(C2+1),"ddd")

and this worked.

Thanks for the help!
--
Earn extra cash from your computer!
Visit http://24hourwebcash.com/curiale1234

God Bless,

Tony


"Dave Peterson" wrote:

If the value in A1 is a date (a real number), then you could use this kind of
conditional formatting formula to check to see if it is Saturday or Sunday:

=WEEKDAY(A1,2)5



Buro AP wrote:

Hi,

I want some cells to turn gray if the data contained therein is a date
number such as 39485. How do I create a condition that can determine that?
I was able to get it to work when the cell was filled with a text "Sat" or
"Sun", but now that I've managed to have the actual serial number display as
"Sat" and "Sun" the condition no longer applies because the returned value is
a number and not text.
--
Earn extra cash from your computer!
Visit http://24hourwebcash.com/curiale1234

God Bless,

Tony


--

Dave Peterson



All times are GMT +1. The time now is 02:53 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com