This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
Excel: How to roundup a number to the closest ten?
I made this question a few hours ago, but I wasn't very specific:
How to roundup a number to the closest ten?
Probably the title is not very suggestive. Let me explain you with an
example. I have:
12345.6
2345.1
12345.00000001
I want those numbers to be roundup to 12350. How can I do this? If
possible, I would rather use formulas instead of VBA.
This is the original question, but at the same time, I want the same result for:
12340.0001 to be modified in 12350. Somehow I don't know if this is still a round operation. :)
I'm sorry for duplicating the question, but posting a comment at the first question, didn't draw enough attention. :)
Divide by 10, round with the regular function (Round x,0) and multiply by 10 again...
=(ROUND(E7/10;0)*10)
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 4 days ago.
Improve this question
I want to use excel to find the best combination of swimmers for a 4x100m mixed medley. Each swimmer has 4 times recorder *one for each discipline fly, free, back, breast) and there are x swimmers.
The time notation is mm:ss,00 for each measurement.
The result should be the names of the swimmers who have combine e best time as a sum.
A swimmer can not swim in two disciplines at the same medley.
Any ideas on how this can work out in excel without VBA?
Thanks!
Miltos
I changed every time measurement to a decimal number and tried to add the possible combinations together, so that I can then compare the results and find the minimum which would give the best combination. I can not find an easy way to do the combination sums.
This question already has an answer here:
Implement p-mean in excel
(1 answer)
Closed 3 years ago.
I'm trying to implement p-means, as laid out in this question
If p=2, I can do SQRT(SUMSQ(data)).
If p=3, I need to do CBRT(**SUM OF CUBES**(data))
And so on. The first part is easy to scale, I can just raise the whole thing to 1/N. But how would I implement sum of cubes, fourth powers, etc. ?
"But how would I implement sum of cubes, fourth powers, etc."?
With SUMPRODUCT:
If your data is in A1:A3 for example:
=SUMPRODUCT(A1:A3^3)
=SUMPRODUCT(A1:A3^4)
etc.
I'd ditch the use of SUMSQ here and just use SUMPRODUCT all around.
Scott's answer to another question of mine is what I ended up using:
=(SUM(IF(ISNUMBER(E2:E99),E2:E99^3))/COUNT(E2:E99))^(1/3)
This is an array formula (ctrl + shift + enter or it won't work).
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 8 years ago.
Improve this question
I need a function that returns the closest value to zero from from a range e.g A1 - A10.
I have found solutions for this on other websites however the value that is returned is rounded to no decimal places.
For my purposes I need the closest value to zero that retains up to ten decimal places.
I have tried the formula:
=INDEX(A1:A15,MATCH(SMALL(INDEX(ABS(A1:A15),0,1),COUNTIF(A1:A15,0)+1),INDEX(ABS(A1:A15),0,1),0))
however, If say the closest value is -1.0896 It will return -1 not -1.0896
I have a vba procedure changing the values in the range. so a vba solution that saves the closest value to zero to a variable would work.
When I use your solution from your question it seems to work, it does not round -1.002 to -1, it shows -1.002 if that is the closest to 0. However an alternative:
It isn't very pretty but if you need it to retain the negative value then this should work:
{=IF(MIN(ABS(A1:A25))=MIN(ABS(IF(A1:A25>0,A1:A25,MAX(A1:A25)))),1,-1)*MIN(ABS(A1:A25))}
I think the only time it wouldn't work is if all the numbers were negative, in which case it would return the number as a positive. The only way I can think of to negate this would be:
{=IF(MAX(A1:A25)<=0,-1,IF(MIN(ABS(A1:A25))=MIN(ABS(IF(A1:A25>0,A1:A25,MAX(A1:A25)))),1,-1))*MIN(ABS(A1:A25))}
As I said, not pretty but without VBA I can't think of a better solution; I'd love someone smarter than me to show me a better way...
Note The { curly brackets denote an array formula, you type it without the brackets and hold Shift + Ctrl while hitting Enter to tell Excel it is an array.
This question already has answers here:
Excel Countif with multiple if requirements
(4 answers)
Closed 8 years ago.
Needing to automate results of alerts within certain time frames based on a 24 hour clock (00:00:00). I believe that a COUNTIF command may be a solution, but not really sure how to use or setup.
Here are my columns that I am trying to use...
E11:E61 - represents my time. I am looking to pick out those values that fall within 02:00:00 - 06:59:59 from this column.
Then, after filtering that answer. I need to see which of cells in that time frame equal a win or a loss. My column for win or losses is Q11:Q61. That will be one separate field that I will calculate this in.
Then, in another field, I need to calculate a win amount based on whether a cell falls within the time frame and shows a win. My win amount column is U11:U61.
So, a little more complicated than my experience allows me to solve. So, I could whatever suggestions or recommendations for solving this.
This has been a great resource for me, and I appreciate everyone's input.
As guitarthrower suggested in the comments, you could use the COUNTIFS function to achieve what you are looking for:
WINS =COUNTIFS(E11:E61,">=2:00:00",E11:E61,"<=6:59:59",Q11:Q61, "WIN")
LOSSES =COUNTIFS(E11:E61,">=2:00:00",E11:E61,"<=6:59:59",Q11:Q61, "LOSS")
This question already has answers here:
Excel formula to do the same as x=(b/N)*(-floor(N/2):floor(N/2)) in MATLAB
(2 answers)
Closed 8 years ago.
The 'floor' command in MATLAB is defined as "Round towards minus infinity.
floor(X) rounds the elements of X to the nearest integers
towards minus infinity."
Is there a similar command within Excel, or does anyone know how to perform the same action within Excel?
yes, you can use =INT(A1) formula. It rounds a number (from A1 cell) down to the nearest integer. Here is documentation.