Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() minor change in the code Columns("M:M").Select Selection.NumberFormat = "[$-409]mmm-yy;@" For Each rIncDate In Range("M8:M149") 'Need Last Row loop Select Case format(rIncDate,"mmm-yy") 'change here Case "Jan-03" iJan03 = iJan03 + 1 Case "Feb-03" iFeb03 = iFeb03 + 1 Case Else iOther = iOther + 1 End Select Next rIncDat -- anilsolipura ----------------------------------------------------------------------- anilsolipuram's Profile: http://www.excelforum.com/member.php...fo&userid=1627 View this thread: http://www.excelforum.com/showthread.php?threadid=38247 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
lower case letter "i" always converts to upper case | Excel Discussion (Misc queries) | |||
Converting "uppercase" string data to "lower case" in CSV file | Excel Discussion (Misc queries) | |||
how do I count only lower case "x" and exclude upper case "X" | Excel Worksheet Functions | |||
Fix Code: Select Case and "Contains" selection | Excel Programming | |||
Using "Cells" to write "Range("A:A,H:H").Select" | Excel Programming |