Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 54
  • Last Modified:

Retrieving the Month value in Numeric form

Hi,
I have attached a file where I need the Month from another data field. I need the Month to NOT be in Text format. Ideally it should say the Month Name but should have a date in the field too. Eg. - October appears as "October" but when I click on the cell it should show a date too (10/01/16).
Format-question.xlsx
0
viks_mehta
Asked:
viks_mehta
  • 6
  • 6
  • 5
  • +2
2 Solutions
 
Naresh PatelTraderCommented:
try this
=MONTH(C3)

Open in new window

0
 
Naresh PatelTraderCommented:
Or Your Existing Formula
=TEXT(C3,"mm")

Open in new window

For Moth and year in text format
=TEXT(C3,"mm/YYYY")

Open in new window

For Month and year in date format
=MONTH(C3)&"/"&YEAR(C3)

Open in new window

0
 
Glenn RayExcel VBA DeveloperCommented:
If you're not trying to extract the month number from the date (as in the good examples from itjockey above), but want the actual date value to display as the word "October" or "10-2016", then you just need to apply a custom format to the cell.
EE-CustomFormat2.png
"mm-yyyy" will show a two-digit month, a hyphen, then a four-digit year
"mmmm" will show the full month name.

The underlying data will remain unchanged; it will still be a date/time value.

-Glenn
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
viks_mehtaAuthor Commented:
When I use all the solutions above. the month displays as "Jan" instead of "October". Could you please send me the solution in the attached file back to me as just applying your formula does not work for me.
0
 
Naresh PatelTraderCommented:
See Attached
Format-question.xlsx
0
 
Glenn RayExcel VBA DeveloperCommented:
Use "mmmm" (four m's) to get the full name.
1
 
viks_mehtaAuthor Commented:
itjockey - Please see my request. I need the Month to SAY the NAME of the month. When I try and change the format of the Cell E5 the name keeps getting assigned as "Jan". Why is the Month name defaulting to Jan irrespective of the date?
0
 
Glenn RayExcel VBA DeveloperCommented:
See my example file.  Note that the four example cells have the exact same date-time value as in C3, but use custom formats.
EE-Format-question.xlsx
0
 
Naresh PatelTraderCommented:
Assuming Your Data in Cell C3...

Try This Formula
=CHOOSE(MONTH(C3),"January","February","March","April","May","June","July","August","September","October","November","December")

Open in new window

0
 
Naresh PatelTraderCommented:
itjockey - Please see my request. I need the Month to SAY the NAME of the month. When I try and change the format of the Cell E5 the name keeps getting assigned as "Jan". Why is the Month name defaulting to Jan irrespective of the date?

This is the case then your system date format is different ...i guess that is why you facing the problem ...
0
 
Naresh PatelTraderCommented:
just type this in any cell 18oct2016 ---then use =MONTH(Cell Reference) and let us know what is the result ..

i am sleeping now ...i am sure  Mr.Glenn will assist you better then me ...
0
 
viks_mehtaAuthor Commented:
Thanks for all the help itjockey! You have a restful night!
0
 
viks_mehtaAuthor Commented:
Glen, The issue is that I need a formula that can possibly show the Cell Value (C3) which is 10/13/2016  11:02:25 AM to appear as October but I need the actual cell value to be changed to 10/13/16 WITHOUT the time (11:02:25 AM).
0
 
Glenn RayExcel VBA DeveloperCommented:
If you just want the date value, the formula would be =INT(C3) and then you'd apply the custom format "mmmm" that I demonstrated earlier.  See the attached workbook.
EE-Format-question.xlsx
0
 
Rob HensonFinance AnalystCommented:
October appears as "October" but when I click on the cell it should show a date too (10/01/16).

I assume you mean in the formula bar at the top of the screen.

All  of the above will currently show a formula in the formula bar. when you click on the cell. If you want the actual date to show in the formula bar it will have to be copied and pasted as value.
0
 
viks_mehtaAuthor Commented:
Thanks Glenn! This is exactly what I needed! Much appreciated!
0
 
Glenn RayExcel VBA DeveloperCommented:
Glad I could help, but was the solution with the formatting ("mmmm") or converting the date-time value to just a date with =INT(C3)
0
 
viks_mehtaAuthor Commented:
It was converting the value to a date. Formatting the date is easy. This works as the actual value is in a date form with the month name.
0
 
frankhelkCommented:
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.

I have recommended this question be closed as follows:

Split:
-- Glenn Ray (https:#a41849261)
-- itjockey (https:#a41849048)


If you feel this question should be closed differently, post an objection and the moderators will review all objections and close it as they feel fit. If no one objects, this question will be closed automatically the way described above.

frankhelk
Experts-Exchange Cleanup Volunteer
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 6
  • 6
  • 5
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now