LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 171
Default Colouring cells based on day of week?

On Sun, 09 Mar 2008 10:13:38 -0500, StargateFan
wrote:

On Sun, 9 Mar 2008 07:53:02 -0700, Joel
wrote:

A date is just a number with 1 equalling Jan 1, 1900. I assume the blank is
returning a 0 which would be Dec 31,1899. Is this data a weekend???


Not sure I understand the question, since the cell is absolutely blank
when there is no data in it. When user presses a "clear" button, 3
cells get emptied of all data which affects all the dates in the
sheet. A5 is one of the 3 cells. So after that there is nothing in
A5 at all, whereas the other date cells always have formulas similar
to this (I found it was easier working with absolutes, so that is only
change to original sheet's formulas):
=IF($A$5<"",($A$5+1),"")


[SNIP]

Fixed! My solution wasn't elegant or anthing and don't ask me why it
works, but it does the job. At some point just now, a flash bulb went
off. Since it was the CF that was affected by a blank cell, or it
seemed to be, then I just changed the formula to not depend on the
contents of the empty cell<duh!

I changed
=(OR(WEEKDAY($A$5)=1,WEEKDAY($A$5)=7))
to
=(OR(WEEKDAY($A$7-1)=1,WEEKDAY($A$7-1)=7))
and presto. When A5 is blank, row B4:G4 is now clear of all colour.

Go figure ... :oD

 
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
Automatically copy cells from two week day sheets based from today MMs4MSU Excel Discussion (Misc queries) 0 November 25th 09 03:23 PM
Automatic colouring of cells Hustler24 Excel Discussion (Misc queries) 2 June 28th 06 09:18 AM
Automatic colouring of cells plf100 Excel Worksheet Functions 3 March 29th 06 03:10 PM
colouring cells that are between two dates Ian[_13_] Excel Programming 2 September 6th 05 08:49 PM
Colouring cells Sam A Excel Programming 2 August 17th 04 03:27 PM


All times are GMT +1. The time now is 05:29 PM.

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

About Us

"It's about Microsoft Excel"