View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Craigm[_13_] Craigm[_13_] is offline
external usenet poster
 
Posts: 1
Default SELECT CASE "Jan-03" confusion


Column M8 through M1800 is a date column and holds dates such a
"2/18/2003 9:28:00 AM" I would like to count the number of entries m
Month and Year.

I can change the format of the column but that only changes th
display. When I run the SELECT CASE below I get all zeros because th
date format for the CASE statement is still "2/18/2003 9:28:00 AM
even though "Feb-03" is displayed in the column.

-----------------------------
Columns("M:M").Select
Selection.NumberFormat = "[$-409]mmm-yy;@"

For Each rIncDate In Range("M8:M149") 'Need Last Row loop

Select Case rIncDate
Case "Jan-03"
iJan03 = iJan03 + 1
Case "Feb-03"
iFeb03 = iFeb03 + 1
Case Else
iOther = iOther + 1
End Select
Next rIncDate
-----------------------------

THANKS FOR YOUR SUGGESTIONS THEY WILL BE GREATLY APPRECIATED!

CRAIG

--
Craig
-----------------------------------------------------------------------
Craigm's Profile: http://www.excelforum.com/member.php...fo&userid=2438
View this thread: http://www.excelforum.com/showthread.php?threadid=38247