ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Using CASE Statement to Derive Months from Numeric Dates (https://www.excelbanter.com/excel-programming/387389-using-case-statement-derive-months-numeric-dates.html)

Jennifer Cali

Using CASE Statement to Derive Months from Numeric Dates
 
Hello,
I have a list of hire dates that I need to group by month. I've included in
the macro to convert the dates from text column using the "\" as a
delimiter (ex: 1\1\2007 would be split into three columns...the month column
now houses a 1, the day column houses a 1, and the year column houses a
2007). I then want a case statement in the macro that will change all the
months in the month column that begin with a 1 to January, a 2 to February,
and so on. The month column is currently my column D, and I plan on deleting
the day and year columns as they are not needed...I just need hire dates
grouped by the month that the hire occurred in.
--
Thank you! - Jennifer

Jon Peltier

Using CASE Statement to Derive Months from Numeric Dates
 
If your date is in A1, this formula returns the month:

=TEXT(A1,"mmmm")

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______


"Jennifer Cali" wrote in message
...
Hello,
I have a list of hire dates that I need to group by month. I've included
in
the macro to convert the dates from text column using the "\" as a
delimiter (ex: 1\1\2007 would be split into three columns...the month
column
now houses a 1, the day column houses a 1, and the year column houses a
2007). I then want a case statement in the macro that will change all the
months in the month column that begin with a 1 to January, a 2 to
February,
and so on. The month column is currently my column D, and I plan on
deleting
the day and year columns as they are not needed...I just need hire dates
grouped by the month that the hire occurred in.
--
Thank you! - Jennifer




Jennifer Cali

Using CASE Statement to Derive Months from Numeric Dates
 
THIS IS PERFECT!
--
Thank you! - Jennifer


"Jon Peltier" wrote:

If your date is in A1, this formula returns the month:

=TEXT(A1,"mmmm")

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______


"Jennifer Cali" wrote in message
...
Hello,
I have a list of hire dates that I need to group by month. I've included
in
the macro to convert the dates from text column using the "\" as a
delimiter (ex: 1\1\2007 would be split into three columns...the month
column
now houses a 1, the day column houses a 1, and the year column houses a
2007). I then want a case statement in the macro that will change all the
months in the month column that begin with a 1 to January, a 2 to
February,
and so on. The month column is currently my column D, and I plan on
deleting
the day and year columns as they are not needed...I just need hire dates
grouped by the month that the hire occurred in.
--
Thank you! - Jennifer






All times are GMT +1. The time now is 05:36 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com