Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 178
Default Cell colours according to date

I have formulas set up to have in cell a1 Mon 01/01/07 as a date, in the rest
of the cells I have =a1+1 and so on to fill in all dates for the year, what I
need is for cells that only contain Sat and Sun in the date to change colour
to yellow, is this possible, I have tried through CF but not formatting as
the cells contain formulas

Regards

MN
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Cell colours according to date

Have another look at CF

Formula Is: =WEEKDAY(A1,2)5

Regards,
Peter T

"santaviga" wrote in message
...
I have formulas set up to have in cell a1 Mon 01/01/07 as a date, in the

rest
of the cells I have =a1+1 and so on to fill in all dates for the year,

what I
need is for cells that only contain Sat and Sun in the date to change

colour
to yellow, is this possible, I have tried through CF but not formatting as
the cells contain formulas

Regards

MN



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 178
Default Cell colours according to date

I put this formula into CF still nothing getting done.

"Peter T" wrote:

Have another look at CF

Formula Is: =WEEKDAY(A1,2)5

Regards,
Peter T

"santaviga" wrote in message
...
I have formulas set up to have in cell a1 Mon 01/01/07 as a date, in the

rest
of the cells I have =a1+1 and so on to fill in all dates for the year,

what I
need is for cells that only contain Sat and Sun in the date to change

colour
to yellow, is this possible, I have tried through CF but not formatting as
the cells contain formulas

Regards

MN




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Cell colours according to date

=WEEKDAY(A1,2)

for dates Mon-Fri returns 0-5
for dates Sat & Sun returns 6 & 7

=WEEKDAY(A1,2)5

Returns True for Dates Sat & Sun

Also returns True if cell is empty or 0 (if necessary the CF formula can be
amended to exclude empty or 0 cells)

See the Weekday function in Help

Does A1 contain a true date, not text. If you clear all formats the cell
should show a number.

In the CF dialog did you change 'Cell Value Is' to 'Formula Is'

Regards,
Peter T

"santaviga" wrote in message
...
I put this formula into CF still nothing getting done.

"Peter T" wrote:

Have another look at CF

Formula Is: =WEEKDAY(A1,2)5

Regards,
Peter T

"santaviga" wrote in message
...
I have formulas set up to have in cell a1 Mon 01/01/07 as a date, in

the
rest
of the cells I have =a1+1 and so on to fill in all dates for the year,

what I
need is for cells that only contain Sat and Sun in the date to change

colour
to yellow, is this possible, I have tried through CF but not

formatting as
the cells contain formulas

Regards

MN






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 178
Default Cell colours according to date

Still not working for me, A1 does contain a true date, when I enter the
formulas you gave me it doesn't return the dates in the cells as if mon
01-jan-07 and so on until the end of the year and I don't have an option to
change cell value to formula is in 2007

Regards MN

"Peter T" wrote:

=WEEKDAY(A1,2)

for dates Mon-Fri returns 0-5
for dates Sat & Sun returns 6 & 7

=WEEKDAY(A1,2)5

Returns True for Dates Sat & Sun

Also returns True if cell is empty or 0 (if necessary the CF formula can be
amended to exclude empty or 0 cells)

See the Weekday function in Help

Does A1 contain a true date, not text. If you clear all formats the cell
should show a number.

In the CF dialog did you change 'Cell Value Is' to 'Formula Is'

Regards,
Peter T

"santaviga" wrote in message
...
I put this formula into CF still nothing getting done.

"Peter T" wrote:

Have another look at CF

Formula Is: =WEEKDAY(A1,2)5

Regards,
Peter T

"santaviga" wrote in message
...
I have formulas set up to have in cell a1 Mon 01/01/07 as a date, in

the
rest
of the cells I have =a1+1 and so on to fill in all dates for the year,
what I
need is for cells that only contain Sat and Sun in the date to change
colour
to yellow, is this possible, I have tried through CF but not

formatting as
the cells contain formulas

Regards

MN








  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Cell colours according to date

What happens if you enter
=WEEKDAY(A1,2)
in any cell and A1 contains 1/1/07, a Monday
The formula should return 1
Now try some other dates incl Sat & Sun, eg Sun 21-Jan-07 should return 7

Now change the formula to =WEEKDAY(A1,2)5

try different dates
do you get the False for Mon-Fri and True for Sat & Sun

If it works in cells it should work in CF

I don't understand what you mean here
I don't have an option to
change cell value to formula is in 2007


I haven't asked you to change the cell from a value to a date, it doesn't
make any difference to the CF if the cell is a 'constant' date value or a
formula that returns a date. However in the CF dialog you MUST change 'Cell
Value Is' to 'Formula Is'

Regards,
Peter T

"santaviga" wrote in message
...
Still not working for me, A1 does contain a true date, when I enter the
formulas you gave me it doesn't return the dates in the cells as if mon
01-jan-07 and so on until the end of the year and I don't have an option

to
change cell value to formula is in 2007

Regards MN

"Peter T" wrote:

=WEEKDAY(A1,2)

for dates Mon-Fri returns 0-5
for dates Sat & Sun returns 6 & 7

=WEEKDAY(A1,2)5

Returns True for Dates Sat & Sun

Also returns True if cell is empty or 0 (if necessary the CF formula can

be
amended to exclude empty or 0 cells)

See the Weekday function in Help

Does A1 contain a true date, not text. If you clear all formats the cell
should show a number.

In the CF dialog did you change 'Cell Value Is' to 'Formula Is'

Regards,
Peter T

"santaviga" wrote in message
...
I put this formula into CF still nothing getting done.

"Peter T" wrote:

Have another look at CF

Formula Is: =WEEKDAY(A1,2)5

Regards,
Peter T

"santaviga" wrote in message
...
I have formulas set up to have in cell a1 Mon 01/01/07 as a date,

in
the
rest
of the cells I have =a1+1 and so on to fill in all dates for the

year,
what I
need is for cells that only contain Sat and Sun in the date to

change
colour
to yellow, is this possible, I have tried through CF but not

formatting as
the cells contain formulas

Regards

MN








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
How can I customise colours used in charts and keep those colours. LJ Charts and Charting in Excel 3 May 20th 10 01:50 PM
Cell Colours Eddiec Excel Worksheet Functions 8 October 8th 09 10:47 AM
How to save one of the MORE COLOURS in the THEME COLOURS? Wulfy Excel Discussion (Misc queries) 0 August 18th 09 10:25 AM
Cell Colours jmc Excel Discussion (Misc queries) 1 June 16th 07 03:06 PM
Excel 2003 font colours and cell colours bretta Excel Discussion (Misc queries) 1 April 17th 05 03:45 AM


All times are GMT +1. The time now is 05:28 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"