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)
Related
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 3 days ago.
Improve this question
an example of the data set I have is shown below: enter image description here
With this I want to be able to combine rows that have the same (Date, Scope & Category) and have the Val/COArea Crcy column sum together the rows values so I then have one row displaying the Date, Scope, Category, and value.
Hopefully this makes sense... Thanks!
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 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.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 5 years ago.
Improve this question
So I have a table for values of jewelry, basically a formula is in place that calculates a few parameters off an inventory file, and then spits out the average price.
=IFERROR(AVERAGEIFS($S:$S,$B:$B,">=.10",$B:$B,"<=.19",$F:$F,"=VVS2",$E:$E,"=F",$A:$A,"=RD"), "-")
It looks like this:
Here's my issue though, I want to do that to hundreds of different table iterations. By iterations, I mean changing the jewelry/stone size. So .10-.19, .19-.29, all the way up to 11.0
Additionally, I'd like to do these to 6 or so different jewelry shapes, the example I provided is just for the keyword RD (ROUND).
Is there some automated way to modify the excel formula and sort of, plug it in? I know that's not very specific, but what I know for sure, is there's no way I can spend the time manually changing every cell for every different parameter, that would take just forever haha.
Appreciate any thoughts or suggestions, thank you.
Short of writing a custom function with VBA, you could try the following approach:
Instead of hard-coding the parameters into the formula, put the parameters into cells and then refer to the cells in the formula. For example, put the values into the cells Z1 to Z6 like this:
Then you can change the formula to
=IFERROR(AVERAGEIFS($S:$S,$B:$B,">="&$Z$1,$B:$B,"<="&$Z$2,$F:$F,$Z$3,$E:$E,$Z$4,$A:$A,$Z$5), "-")
Now you can change any of the values in Z1 to Z6 to calculate with different parameters.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I need to find a formula that I can use for any number, and have it output a number identified to correspond to that range.
For instance, I need to be able to input:
A number >2.50 and <7.49, and the formula spit out $0.05
A number >7.50 and <24.49, and the formula spit out $0.10
A number >25.00 and <74.99 and the formula spit out $0.50, and so on/so forth.
If you want to have a set of pre-defined values that you output as you showed in your example then I would use =VLOOKUP() like this:
Using this you can set what your desired output is in the table. Now I cannot tell if there is a pre-defined pattern you are using to determine your outputs, if so a simple math algorithm might make more sense than this.
It is possible to do this in a single formula:
=INDEX({0,0.05,0.1,0.5,10},MATCH(B1,{0,2.5,7.5,25,75},1))
You'll have to jiggle about with the cut-off points as you haven't stated clearly where the between values should fall, and what happens with larger or smaller values.