Datevalue problems

Bandito1

Board Regular
Joined
Oct 18, 2018
Messages
239
Office Version
  1. 2016
Platform
  1. Windows
Hello,

Im using the formula; =TEXT(DATEVALUE(1&B2);"Mmm")&B1 to get the format jan2023 from 2 cells that contain januari and 2023.
Now i want to turn it to english; but when the cell contains January i get an #value error.

Also i want that it turn into Jan23 instead of jan2023.

Someone knows what i going wrong when i start using English months and how to lose "20" from 2023


Book1
AB
12023
2jan2023Januari
3#VALUE!January
Sheet1
Cell Formulas
RangeFormula
A2A2=TEXT(DATEVALUE(1&B2),"Mmm")&B1
A3A3=TEXT(DATEVALUE(1&B3),"Mmm")&B1
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
Regional settings on my system dd-mm-yyyy

T202210a.xlsm
ABCD
12023
2Jan23January
3Jan23Jan
4
5Jan23Januaryformat mmmyy
6Jan23Jan format mmmyy
7
2c
Cell Formulas
RangeFormula
A2:A3A2=TEXT(DATEVALUE(1&LEFT(B2,3)&$B$1),"Mmmyy")
A5:A6A5=--(1&LEFT(B5,3)&$B$1)


T202210a.xlsm
ABCD
12023
2Jan2023January
3Jan2023Jan
4
5Jan2023Januaryformat mmmyyyy
6Jan2023Jan format mmmyyyy
7
2c
Cell Formulas
RangeFormula
A2:A3A2=TEXT(DATEVALUE(1&LEFT(B2,3)),"Mmm")&$B$1
A5:A6A5=--(1&LEFT(B5,3)&$B$1)
 
Last edited:
Upvote 0
Someone knows what i going wrong when i start using English months and how to lose "20" from 2023
Because your regional date settings aren't in the English format (see column C in my setup below as mine are in English format).
Is there any reason you can't just use the formula in column A below (text date) or the formulas in A5:A6 in Dave's post formatted as mmmyy (real date)?

Book1.xlsb
ABC
12023
2Jan23Januari#VALUE!
3Jan23JanuaryJan2023
Sheet1
Cell Formulas
RangeFormula
A2:A3A2=LEFT(B2,3)&RIGHT($B$1,2)
C2C2=TEXT(DATEVALUE(1&B2),"Mmm")&B1
C3C3=TEXT(DATEVALUE(1&B3),"Mmm")&B1
 
Last edited:
Upvote 0
It now looks like this;

Book1
AB
12023
2janyyJanuary
3janyyJan
4
5jan23January
6jan23Jan
Sheet1
Cell Formulas
RangeFormula
A2:A3A2=TEXT(DATEVALUE(1&LEFT(B2,3)&$B$1),"Mmmyy")
A5:A6A5=--(1&LEFT(B5,3)&$B$1)


A5 is almost right; can the J of Jan be with a capital J ?
Changed cell property to custom and then [$-nl-NL]mmmjj;@
 
Upvote 0
You stated "Changed cell property to custom and then [$-nl-NL]mmmjj;@"

I do not have information on your systems Regional Settings or the details of Custom number formats in your region.
I suggested Custom Number format of mmmyy. How do dates normally show on your system?

You can try =PROPER(TEXT(DATEVALUE(1&LEFT(B2,3)&$B$1),"mmmyy")). I cannot test this suggestion since I do not have the same setup as you have.

or TEXT result

T202210a.xlsm
ABC
12023
2JanuaryJan23
3JanJan23
4januaryJan23
5janJan23
6
2c
Cell Formulas
RangeFormula
C2:C3C2=LEFT(B2,3)&RIGHT($B$1,2)
C4:C5C4=PROPER(LEFT(B4,3)&RIGHT($B$1,2))
 
Last edited:
Upvote 0
Solution

Forum statistics

Threads
1,224,825
Messages
6,181,190
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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