Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Conditional Formats Date Based lau Excel Discussion (Misc queries) 1 December 30th 09 10:30 PM
generate serial numbers and date it entered irealtymods Excel Discussion (Misc queries) 3 August 5th 09 08:16 AM
Changing text dates to date serial numbers George[_5_] Excel Worksheet Functions 6 January 2nd 08 10:44 PM
Changing date serial numbers rdunne Excel Discussion (Misc queries) 1 April 14th 05 12:57 PM
Date and sequential serial numbers Peter B Excel Programming 8 February 12th 04 12:49 PM


All times are GMT +1. The time now is 12:17 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"