month datevalue language issue

davidov

New Member
Joined
Aug 1, 2017
Messages
11
Hi all,

I have a column with month names in English (January, February, etc) and I wanted to transform them into months (and in the end in a complete date based on month-end) with this formula:
=MONTH(DATEVALUE(C2&" 1"))

However my regional language is not in English, but the months are. So for most months I get the #value error.

So does anyone know how to solve this?

And bonus question :) any way to transform just the month-name with a formula to 1-month-first year month-name happens again.
So it's September now, so if it is still September it would be 1-9-2018, no matter which day in September it actually is. However if month-name would be July it would have to say 1-7-2019. Is this possible (without VBA)?
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
If your version doesnt understand January then id use either whatever word you need for it to understand or some sort of lookup table to do a conversion. Be careful as if i type in January 1 in my machine it will think i mean 1st January 2001.

For the second part id do:

=DATE(YEAR(TODAY()),MONTH(1&A1),1)

With 'January' in A1. That may also be location specific though.

Edit:

You potentially can just do:

=0+(1&A1)
 
Last edited:
Upvote 0
Lookup table of course. I was thinking too much in my little box. Thank you, and I am going to experiment with part 2 :)
 
Upvote 0
As Steve the Fish advised, use your word for January and September in the example below


Excel 2010
ABC
1DateEnd of Month
2January1-Jan-1831-Jan-18
3September1-Sep-1830-Sep-18
4
2c
Cell Formulas
RangeFormula
B2=0+(1&A2)
B3=0+(1&A3)
C2=EOMONTH(B2,0)
C3=EOMONTH(B3,0)
 
Upvote 0
Yes thank you as well. I made a nice formula in the end :)

Formula
=IF(A1="","",IF(EOMONTH(DATE(YEAR(TODAY()),MONTH(1&A1),1),0)>TODAY(),EOMONTH(DATE(YEAR(TODAY()),MONTH(1&A1),1),0),EOMONTH(DATE(YEAR(TODAY())+1,MONTH(1&A1),1),0)))

<tbody>
</tbody>

<tbody>
</tbody>


If the cell is blank then blank, if today is in the given month or still has to come the year will be 2018. If the month is in the past, the year will be 2019 (2018+1) instead of just 2018.

<tbody>
</tbody>
 
Upvote 0
try
=IF(A1="","",EOMONTH(0+(1&A1),0+(MONTH(0+(1&A1)) < MONTH(TODAY()))*12))


Excel 2010
ABC
1January31-Jan-19
2c
Cell Formulas
RangeFormula
C1=IF(A1="","",EOMONTH(0+(1&A1),0+(MONTH(0+(1&A1))TODAY()))*12))
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,922
Messages
6,122,281
Members
449,075
Latest member
staticfluids

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