I want to convert a column of dates in QTR/YR format to MM/DD/YYYY format, using the first day of the quarter (the first days of the four quarters are Jan. 1, April 1, July 1 and Oct. 1.) How can I go about doing this?
Example:
4Q14 should become 10/01/2014
3Q14 should become 7/01/2014
2Q14 should become 4/01/2014
and so forth.
Try this:
=Date(Right(A1,2)+2000,CHOOSE(Left(A1,1),1,4,7,10),1)
If cell A1 contains the text, then
=DATE(2000+RIGHT($A$1,2),-2+3*LEFT($A$1,1),1)
is one way. That will yield a number that you can format as a date, using the format of your choice.
Related
Is there a way for me to format a column where the values I enter in the format HH:MM (elapsed time, not datetime) are converted to hours in decimal, preferably in the same column via some custom formula?
For example,
HH:MM
H (Decimal)
07:39
7.65
02:15
2.25
06:00
6
At the moment, I manually calculate the equivalent and enter them into the column but it would be nice to directly copy a timestamp and have the column automatically format it but I couldn't see an option for this in Date/Time formatting settings.
Simply multiply your hh:mm durations by 24, ensuring that the cells where you want the decimal hours returned are formatted as 'Number'. Or to force formatting as a number using a formula: =text(duration_cell*24,"#.##") where duration_cell is a cell with the duration in hh:mm format.
There is no way to do that I know of because Excel stores times/dates as floats. Each 24 hour period equals 1, therefore 7:33 equals .31458 Therefore, you won't be able to do this without a helper column.
You can do this with either #The God of Biscuits answer, or alternatively your helper column can have the formula:
=(A1*24)
and you set that column's cell format to Number.
All date and time is a format of a double value.
Time is the amount after the comma.
And all in front of comma is days since 00.01.1900.
Meaning 07:37:00 = 0,32 days.
Excel have a ways to pull the amount of hours with =HOUR('Your referance date time cell value')
You can aply this formula: =HORA(A2)+(MINUTO(A2)/60)
I've got data in a spreadsheet that's formatted YYYYMM and I need to convert it to Month Year format (i.e. 201406 -> June 2014)
I'm using RIGHT() and LEFT() to pull the corresponding bits from the initial data cells, but I can't figure out how to turn the month number into a month name (i.e. 06 -> June, 01 -> January, etc.)
I've tried TEXT(RIGHT(B2,2),"mmmm") which only returns January regardless of the number inputted.
Ideally this should be easy, so, any thoughts? Thanks.
You can use DATE([Year],[Month],[Day]) passing any values for year and day. Just note that this will make the actual value of the cell different to 12 though.
Excel will be reading 12 as a date which will be 12 days after 00/01/1900 (this is 0 as a date) returning 12/01/1900 which is in January.
TEXT(DATE(1,B2,1),"mmmm")
To make 201406 -> June 2014, The Date() formula would do pretty good job indeed. This is the whole formula that would make the transition:
=TEXT(DATE(LEFT(A1,4),RIGHT(A1,2),1),"MMMM YYYY")
Or something hardcoded as this can work:
=CHOOSE(B1,"January","February","March","April","May","June","July")
Another way is to add "01" to the end of your number so you can format it to look like a date, and then return the month from it.
=Text($A$1 & "01","####-##-##") will return 2014-06-01.
=TEXT("2014-06-01","mmmm yyyy") will return June 2014.
So....
=TEXT(TEXT($A$1 & "01","####-##-##"),"mmmm yyyy") returns June 2014.
I am making an on-call schedule in excel and I can't for the life of me find an easy way to populate the dates. For example, someone is on call from Monday to Sunday, January 2nd - January 8th. Then the next person is on call from January 9th - January 15th. I am trying to figure out a way or formula to just "Drag" down the column and it input the next 7 day range. I have tried input the start date and end date in a separate cell, then using concatenate but it returns the date number in excel (forgot what its called). I also tried =(A1&" - "&B1) but that returns the same 5 digit number.
Any help or pointers are greatly appreciated!
Previous date + 7
If you have genuine dates, say in cells A1 "start date" and B1 "end date":
Jan 2 Jan 8
Then the next line will be
=A1+7 =B1+7
Verify Dates
To see, if the "Dates" you entered are realy dates excel can work with like that, apply "General formatting" to the A1 and B1 cells. If the resulting value is an Interer or a Decimal number, you are golden. If the resulting value did not change, you have a text and you need to apply different approach.
Perhaps you are looking for this:
=TEXT(A1,"d-mmm")&" - "&TEXT(B1,"d-mmm")
The formatting specification can be copied from the formatted cell properties.
I've tried a million things to get Excel to read a date that is being pulled by this formula:
=(LEFT(VLOOKUP(C7,'Input Engagement Status'!C:M,9,FALSE),11))
I use LEFT because the cell I'm referencing is storing two dates simultaneously. The output is "mmm dd yyyy".
I have tried text to columns, but the formula is being pulled apart rather than the date that it reads for.
I have tried custom formatting to create a new date format for "mmm dd yyyy". I have changed from general, to numbers, to text, and I am out of solutions at this point. Any help would be greatly appreciated.
A way to illustrate the differences is with a date on the worksheet. Excel treats dates as 1 for every day past Dec 31, 1899. Today happens to be 42,192 (or 42192 as Excel sees it).
If you put =TODAY() in a cell (e.g. A1) and use =RIGHT(A1, 2), the A1 cell probably shows 07/07/2015 but the underlying value is 42192 so the RIGHT(A1, 2) is going to return 92. Format the cell so it displays Tuesday, July 7, 2015 and RIGHT(A1, 2) is still going to return 92.
If you have two dates in the same cell separted by a space or other delimiter as a text string then you should be able to pull the first 11 characters from the string value and convert it back to a date with the DATEVALUE function.
Using this data in a single cell (A1):
Jul 07 2015 Jul 15 2015
Use the SUBSTITUTE function to insert a comma so that DATEVALUE will resolve the date correctly.
=DATEVALUE(SUBSTITUTE(LEFT(A1, 11), " 20", ", 20"))
=DATEVALUE(SUBSTITUTE(RIGHT(A1, 11), " 20", ", 20"))
Format the result as a date. The above will return 42,192 and 42,200 (the number of days since Dec 31, 1899). Format as a date to get something like 07/07/2015 and 07/15/2015.
You should be able to transcribe your VLOOKUP function into that simple example.
I have a column with the following values:
month
201201 // means January of 2012
201102 // means February of 2011
201203
201304
...
201307
201106
I need to create a new column that would be convert the last two numbers in the month column into the name of the month, so that 201201 will become Jan-2012, 201106 should become Jun-2011.
How can I parse the last two characters?
This gives you the formatting you want:
=TEXT(DATE(LEFT(A1,4),RIGHT(A1,2),1),"MMM-YYYY")
=DATE(MID(A2,1,4),MID(A2,5,2),1)
You can use LEFT and RIGHT functions and concatenate the results. Assuming the first value is in A2:
=(1&"-"&RIGHT(A2,2)&"-"&LEFT(A2,4))*1
And format the cell as mmm-yyyy.
This assumes that your regional settings have dates as dd/mm/yyyy format.
Otherwise, you'll have to switch the month and date around.
=(RIGHT(A2,2)&"-"&1&"-"&LEFT(A2,4))*1