Converting Year/Month to correct date

Unicode

Board Regular
Would you know what would be the correct formula for converting year/month to correct date. Example: All rows display 2019/01, 2019/02, 2019/03... etc.

What I really need is to have the date listed as, "01/2019".

I tried to use "Text to Columns" and Format cells, DATE. I remain with date errors #VALUE ! on Column rows.
 

Fluff

MrExcel MVP, Moderator
If you put =LEN(B3) into a cell where B3 conatins 2019/01 what does it say?
 

Joe4

MrExcel MVP, Junior Admin
I just tried again, Text to Columns, and I get:
Jan-19
2/1
3/1
4/1
5/1
6/1
7/1
8/1
9/1
10/1
11/1
12/1
That implies that it successfully converting them to dates.
Now, just apply a Custom Format of "mm/yyyy", and you should be all set.
 

Rick Rothstein

MrExcel MVP
Would you know what would be the correct formula for converting year/month to correct date. Example: All rows display 2019/01, 2019/02, 2019/03... etc.
Noting that you are looking for a formula solution...

Those are Text strings, not dates. If you wanted the correct display (still Text, not real dates), you could use this formula...

=MID(A1&A1,8,7)

If you wanted real dates (you would have to custom format the cells to make them look the way you want), you could use this formula (note the dates would be the 1st of the month)...

=0+SUBSTITUTE(A1&"-01","/","-")
 

Some videos you may like

This Week's Hot Topics

  • Importing multiple excel files into one spreadsheet
    Hi, I'm trying to import multiple excel files (with the same format into a single spreadsheet) so that each day's file is listed underneath the...
  • find many based on a certain criteria
    good evening, I hope someone can help me? I have a workbook sheet 2 contains lots of data.... I would like to be able to find anything on sheet...
  • How to copy multiple rows using If
    Hi all, I'm very new to VBA and have written this simple code to copy certain cells if a certain cell within that row contains any data. I need...
  • VBA If statement
    Dear All, I have two dates, where I'd like a message box to pop, if the dates are between this criteria. [CODE] sDate1 = #10/1/2019#...
  • Text Format
    I have a sheet for user to keyin the data. The format of the data can be 451 / 1903, 0012 / 9908 or 00287 / 0099. The number after the "/" is...
  • Syntax errors
    Good Morning, Trying to compile a workbook, I keep getting a few errors. Here are the first two: [code=rich]Syntax Error: Function...
Top