Convert date to month name

ANE0709

Board Regular
Joined
Feb 2, 2022
Messages
65
Office Version
  1. 365
Platform
  1. Windows
i have a date range in J that shows "1/9/2022 - 1/15/2022" which i need to convert to show the name of the month for the first date only. I was using =text(left(J2,10),"mmmm") before my file was corrupted. now im starting over and putting all formulas in from scratch. this one was working but isnt anymore. Any ideas why not and how to fix it?

1644265635242.png
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
your formula is correct, cell format is wrong perhaps?
 
Upvote 0
Not all those dates are 10 characters long, try
Excel Formula:
=TEXT(LEFT(J2,FIND(" ",J2)),"mmmm")
 
Upvote 0
Solution
your formula is correct, cell format is wrong perhaps?
any idea what it might need to change to? for column J i have tried general, several date formats, number, text, and custom mmmm with no luck. nothing that i know of changed when recreating the file. the data was exported from an online source in the same manor as before.
 
Upvote 0
It's nothing to do with the cell format. See post#3
 
Upvote 0
any idea what it might need to change to? for column J i have tried general, several date formats, number, text, and custom mmmm with no luck. nothing that i know of changed when recreating the file. the data was exported from an online source in the same manor as before.
I think fluff's solution will work better, I didn't spot that dates weren't all 10 characters long
 
Upvote 0
Not all those dates are 10 characters long, try
Excel Formula:
=TEXT(LEFT(J2,FIND(" ",J2)),"mmmm")
Fluff - yours worked. curious though, with the find(" ",J2) does that mean find everything before the space? im still stumped why the formula i had was working before but not now. not sure whats different.
 
Upvote 0
Slightly better:
Why? The TEXT function is not bothered by the trailing space. Given that, and on the off chance that occasionally there might not be a space between the date and dash, this might be slightly better...
Excel Formula:
=TEXT(LEFT(J2,FIND("-",J2))-1,"mmmm")
 
Upvote 0

Forum statistics

Threads
1,215,528
Messages
6,125,338
Members
449,218
Latest member
Excel Master

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top