LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 50
Default Conditional formatting and counting.

I have the following Conditional formatting set up in a macro (which works as
expected):-

Columns("F:F").Select
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlBetween, _
Formula1:="=$AM$2", Formula2:="=$AN$2"
Selection.FormatConditions(1).Interior.ColorIndex = 38
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlBetween, _
Formula1:="=$AM$3", Formula2:="=$AN$3"
Selection.FormatConditions(2).Interior.ColorIndex = 40
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlBetween, _
Formula1:="=$AM$4", Formula2:="=$AN$4"
Selection.FormatConditions(3).Interior.ColorIndex = 36


Please note, Columns F, AM and AN contain dates in the format dd/mm/yyyy.

In Column G, I have number in the range 1 to 5.

Is there a way that for the above conditional formats, I can then count the
number of 1,2,3,4,5 that appear in column G for the individual conditional
format?

So if my data looks like:-

Col F Col G Col AM Col AN
21/12/2003 5 01/01/2003 31/03/2003
27/11/2003 5 01/04/2003 31/08/2003
19/11/2003 4 01/09/2003 31/12/2003
16/11/2003 5
25/09/2003 5
28/08/2003 4
14/08/2003 5
15/07/2003 5
04/05/2003 5

Therefore for a data range AM3 AN3 I would expect to see 5*4, 4*1, 3*0, 2*0
1*0 (i.e. Data from the first 5 records).

Any help would be appreciated.

 
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 formatting and then counting specifics within it. Pank New Users to Excel 2 March 13th 07 11:32 AM
counting cells based on conditional formatting Marc Excel Discussion (Misc queries) 3 July 5th 06 08:37 PM
Counting Cells with Conditional Formatting JasonC Excel Discussion (Misc queries) 6 December 30th 05 05:33 AM
conditional counting jim314 Excel Discussion (Misc queries) 5 June 22nd 05 12:36 AM
counting cells with conditional formatting applied HalB Excel Discussion (Misc queries) 3 February 21st 05 01:21 PM


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