Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Coloured Cells and Dates

I have a spreadsheet which consists of dates and coloured background
within the same cell.

If the dates have passed, then they have coloured backgrounds however
if the dates are in the future, then they are not coloured.

I am trying to think of a way in which I can use a macro to move alon
the cells looking for dates which have passed. If they have passed an
do not have coloured backgrounds, I need the macro to add a coloure
background.

Is there a way in which I can use a macro to colour in a background i
the date has passed but not colour it in if the background has a colou
and the date has passed?

Any help would be appreciated. Many Thanks.

Kiz

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Coloured Cells and Dates

Kiza,

You can use conditional formatting without macros.

Select all of the cells (let's assume A1 is the first)
Goto menu FormatConditional Formatting
Change Condition 1 to Formula Is
Add a formula of =A1<TODAY()
Click Format
Select thye patterns tab
Choose a colour
OK
OK

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"kiza " wrote in message
...
I have a spreadsheet which consists of dates and coloured backgrounds
within the same cell.

If the dates have passed, then they have coloured backgrounds however,
if the dates are in the future, then they are not coloured.

I am trying to think of a way in which I can use a macro to move along
the cells looking for dates which have passed. If they have passed and
do not have coloured backgrounds, I need the macro to add a coloured
background.

Is there a way in which I can use a macro to colour in a background if
the date has passed but not colour it in if the background has a colour
and the date has passed?

Any help would be appreciated. Many Thanks.

Kiza


---
Message posted from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,089
Default Coloured Cells and Dates

Kiza

why not use conditional formatting ?

Select all the cells with dates and then enter the following:

Format | Conditional formatting...

Set condition 1 to Formula is: =A1<TODAY() and set the background format to
red
(format | patterns | pick red)
click the add button
Set condition 2 to Formula is: =A1=TODAY() and set the background format to
amber
(as above with amber)
click the add button
Set condition 3 to Formula is: =A1TODAY() and set the background format to
green
(as above with green)

Pick colours of your choice ...

Regards

Trevor


"kiza " wrote in message
...
I have a spreadsheet which consists of dates and coloured backgrounds
within the same cell.

If the dates have passed, then they have coloured backgrounds however,
if the dates are in the future, then they are not coloured.

I am trying to think of a way in which I can use a macro to move along
the cells looking for dates which have passed. If they have passed and
do not have coloured backgrounds, I need the macro to add a coloured
background.

Is there a way in which I can use a macro to colour in a background if
the date has passed but not colour it in if the background has a colour
and the date has passed?

Any help would be appreciated. Many Thanks.

Kiza


---
Message posted from http://www.ExcelForum.com/



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
Coloured Cells The Message Excel Discussion (Misc queries) 8 December 2nd 09 04:44 PM
Counting coloured cells? Atomic Excel Worksheet Functions 2 December 1st 09 10:25 PM
Counting coloured cells SNC-DW Excel Worksheet Functions 0 October 12th 09 12:35 PM
sum coloured cells Manxie Excel Discussion (Misc queries) 1 June 25th 07 12:52 PM
Coloured Cells Becks Excel Discussion (Misc queries) 3 February 8th 06 12:46 PM


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