LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 147
Default For Peter Conditionally format in code and count at same t

I see said the blind man.....er..women! Thanks so very much for your help,
Peter. Seeing your code and putting it into action has helped me understand
what was happending. Your a star!

Cheers,

"Peter T" wrote:

Hello again,

Assuming Today() is date of post (17-Nov-06) your formulas are returning
correct results.

If you apply what are currently your 2nd or 3rd CF's as the 1st I think
you'll see the confusion.

Try these
=SUMPRODUCT(--(F23:F27<TODAY()))
=SUMPRODUCT(--((F23:F27<(TODAY()+7))*(F23:F27=TODAY())))
=SUMPRODUCT(--((F23:F27<(TODAY()+14))*(F23:F27=TODAY()+7)))

Alternatively these entered in A1:A3
=SUMPRODUCT(--(F23:F27<TODAY()))
=SUMPRODUCT(--(F23:F27<(TODAY()+7)))-A1
=SUMPRODUCT(--(F24:F28<(TODAY()+14)))-A1-A2

No doubt can be adapted to COUNTIF if you prefer.

Regards,
Peter T

"Christine" wrote in message
...
Hi again. I'm having difficulty getting the code Peter gave me so nicely

and
hope he or Mike or someone can help again.

In F23 through F27 I have conditional formatting set as follows. This is

to
show me any tasks that are overdue, due within the next week, and those

that
are due in over 2 weeks.

* Cell value is less than =Today() turn font red, bold
* Cell value is less than =Today()+7 turn font yellow, bold
* Cell value is less than =Today()+14 turn font green

NOTE: Technically, I don't want the fonts colored at all if any cells
between Q23 and Q27 have dates in them! This is because Q23 and Q27 have
completion dates in them.

Anyway, in F23 through F27 the cell values are thus:
11-Nov-05 (formatted bold red)
08-Nov-02 (formatted bold red)
18-Nov-06 (formatted bold yellow)
19-Nov06 (formatted bold yellow)
30-Nov-06 (formatted bold green)

However, when I use the following commands for counting the occurances, it
reseults in the following:

=COUNTIF(F23:F27,"<"&(TODAY())) - results in 2 (okay - should be 2)
=COUNTIF(F23:F27,"<"&(TODAY()+7)) - results in 4 (should be 2)
=COUNTIF(F23:F27,"<"&(TODAY()+14)) - results in 5 (should be 1)






 
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
using a time format in a count function gregv7 Excel Worksheet Functions 1 May 6th 10 11:43 PM
Time Code in Cell format ? [email protected] Excel Discussion (Misc queries) 3 December 10th 06 11:29 AM
count conditionally across two columns? gpoky Excel Worksheet Functions 2 December 6th 05 04:56 PM
count time format as decimal Jonsson Excel Programming 0 February 23rd 04 08:17 AM
count time format as decimal Jonsson Excel Programming 1 February 23rd 04 02:38 AM


All times are GMT +1. The time now is 03:37 AM.

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"