Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default SELECT CASE "Jan-03" confusion


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
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
lower case letter "i" always converts to upper case Carolyn Excel Discussion (Misc queries) 1 August 28th 08 01:56 AM
Converting "uppercase" string data to "lower case" in CSV file [email protected] Excel Discussion (Misc queries) 2 August 12th 08 08:36 PM
how do I count only lower case "x" and exclude upper case "X" jbeletz Excel Worksheet Functions 3 October 14th 06 10:50 PM
Fix Code: Select Case and "Contains" selection Bettergains Excel Programming 5 April 26th 05 02:22 AM
Using "Cells" to write "Range("A:A,H:H").Select" Trip Ives[_2_] Excel Programming 3 June 5th 04 03:13 PM


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