How can I extract a month from Excel date?

G

Guest

I have a cell, U9 showing the date, custom formatted as dd-mmm-yy. e.g.
31-Oct-06
I need another cell to show just the month. e.g. Oct
The formula =MID(U9,4,3) always returns a 2 digit number regardless of what
date is in U9. I assume it is the Excel date value that the MID formula is
taking the final two digits from.
How do I get it to show the month as text. e.g. Oct

Thanks,
Lee
 
N

Niek Otten

Hi Lee,

=U9, Format Custom as ddd

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

|I have a cell, U9 showing the date, custom formatted as dd-mmm-yy. e.g.
| 31-Oct-06
| I need another cell to show just the month. e.g. Oct
| The formula =MID(U9,4,3) always returns a 2 digit number regardless of what
| date is in U9. I assume it is the Excel date value that the MID formula is
| taking the final two digits from.
| How do I get it to show the month as text. e.g. Oct
|
| Thanks,
| Lee
|
 
N

Niek Otten

<ddd>

make that mmm

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

| Hi Lee,
|
| =U9, Format Custom as ddd
|
| --
| Kind regards,
|
| Niek Otten
| Microsoft MVP - Excel
|
||I have a cell, U9 showing the date, custom formatted as dd-mmm-yy. e.g.
|| 31-Oct-06
|| I need another cell to show just the month. e.g. Oct
|| The formula =MID(U9,4,3) always returns a 2 digit number regardless of what
|| date is in U9. I assume it is the Excel date value that the MID formula is
|| taking the final two digits from.
|| How do I get it to show the month as text. e.g. Oct
||
|| Thanks,
|| Lee
||
|
|
 
M

Max

.. Both do the job.

In terms of showing / display in the formula cell, yes. But there's a subtle
difference in the underlying values. Formatting retains it as a number,
while using TEXT converts it to text. The underlying value would of course
impact any downstream formulas pointing to that formula cell.

---
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Extract the Month from a cell with a formatted date 3
General cell 2
Wrong date format in header 1
formatting of date 4
Extract month from date 2
Copying Dates 1
Date 7
Help with a Date formula please? 2

Top