Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 4 years ago.
Improve this question
I want to fuse 3 items to one using concatenate formula. I am trying to fuse date (2018-06-08) and 2 normal text items (12 and 45). I use this formula =Concatenate(D2;" ";E2;":";F2) But when I fuse them, I get 43259 12:45, instead of 2018-06-08 12:45. I tried adding TEXT but it only gave me error.
Try,
=D2+time(E2, F2, 0)
Format the result as you prefer. e.g. yyyy-mm-dd hh:mm
Use this:
=CONCATENATE(TEXT(D2,"yyyy-mm-dd"), " ", E2, ":", F2)
Because Google docs (like Excel) represents dates with a number (usually it's the number of days since 1900-01-01), you need to convert it to text format with special instructions specifying the order of day, month, year, and what punctuation to separate them.
Currently the documentation for the TEXT function can be found here.
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 1 year ago.
Improve this question
hi everyone i have one columns is Duration columns, the column is in hour format, and I want to convert it to "hour:minutes" format, what formula can I use in excel?
i use =TEXT(A1/24,"hh:mm")
You need to divide hours by 24. Try below formula-
=TEXT(A1/24,"hh:mm")
Check this article from exceljet.net Convert decimal hours to Excel time.
From #Gary's Student answer, you can also use same format with text function.
=TEXT(A1/24,"[hh]:mm")
With data in A1, in another cell enter:
=A1/24
and format as follows:
Note the brackets in the formatting:
[hh]:mm
The other answers are fine, but I wanted to offer an alternative that does not involve formatting the cell (which may or may not be desirable, although it probably usually is the best way TBH).
The following formula splits the hours and minutes:
=FLOOR(S10,1) & ":" & (S10-FLOOR(S10,1))*60
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I have European style of numbers (with a comma). However, when I download a file from a website, where dots are used in values and try to open it in excel, some of the numbers becomes a date. I.e. in the file values 18.2 is transformed to 18.feb. How avoid this to happen?
Right click on relevant cell, press Format Cells, and under Category choose Text.
Now the cell is defined as general text, not date as default.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
This is undoubtedly a very simple problem, but I don't have much experience with coding in Excel.
In this example, I would like the user to input the # of students into cell B3.
After inputting the # into the cell (for example, if the person input 5), I would like to create that number of rows from A4-A9 based on the notation Student_# (Student_1, Student_2, Student_3, Student_4, Student_5).
If the person put in 10, I would like there to be 10 rows of Student_1 through Student_10 (updated automatically).
The "Student_" will be static as this is an unidentified list, I'd just like to create the number of rows based on this initial input value.
Thanks in advance for any help.
In A5 put:
=IF(ROW(A1)<=$B$3,"Student_" & ROW(A1),"")
And copy down enough to cover the largest number allowed in B3
If one has the Dynamic Array formula simply put:
="Student_"&SEQUENCE(B3)
In A5 and Excel will spill the results down.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I am creating a spreadsheet where the user can enter different numbers and have a different result be returned.
For example if they were to enter a number that started 07, it would show 1, 070 it would show 2, 0345 3 and so on.
I have tried the IF and LEFT formulas but I am struggling!
Any ideas are greatly appreciated!
EDIT: Sorry I was trying not to write war and peace but have missed out too much.
The users will write in phone area codes, e.g. 0345 or 0714 or 0701 and the sheet will return the price.
The price can be different depending on the first 4 digits. To keep it simple for this purpose I want it to be able to detect if the area code starts with 07 to show a "price" of 1, 070 price of 2 and 0345 a price of 3.
I have 10 different area codes but just added the 3 above for examples.
I hope this is clearer.
To get the length of a string with the leading zeros removed use the array function
=LEN(MID(A2,MATCH(TRUE,(MID(A2,ROW(INDIRECT("1:"&LEN(A2))),1)<>"0"),0),LEN(A2)))
Replace A2 with the cell that the users will change and hit [Ctrl Shift Enter] on the cell with the formula to activate the array function.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 8 years ago.
Improve this question
I am having a small problem with splitting up dates using the Excel delimiter tool. Usually I am able to either do some quick format changes to 'Short Date' or delimit with a non-existent delimiter in order to use the DMY option to standardize format. However, I have exhausted both of those options and nonetheless the dates appear to be mismatched. That is, suppose I take RIGHT(A1,4) in order to obtain only the year for each cell containing a date. Some of these give me the correct year e.g. 1973 and some give me a large number e.g. 6340. Why might this be happening?
In excel dates stored as numbers: e.g. 01/01/2013 is 41275 and Right(A1,4) gives you 1275. Try this one instead:
=YEAR(A1)
or
=TEXT(A1,"yyyy")
first formula returns number 2013 and second formula returns text "2013"
UPD:
as follow up from comments, since dates can be stored as text or as dates, this one works:
=RIGHT(TEXT(A1,"mm/dd/yyyy;#"),4)