Can you format the cell where the answer goes?
Set it to NUMBER, 2 places.
"C"&round((A133-F133),2)
"F"&round((F133-A133),2)
one of two options:
value =round(formula,2)
or format the cell to 2 places - for Excel 2010 it's on the home ribbon under Number formatting.
I can't upload or else I would post a picture
looks like my phone call slowed my response down
MathTeacher, post: 329249, member: 7674 wrote: "C"&round((A133-F133),2)
"F"&round((F133-A133),2)
Thank you!
That works.
Thanks to RFB for your response too, I guess you deleted it so I couldn't thank you.
This one doesn't really matter but if there are no 1/100ths it won't show the zero.
For example the result is F 3.20, I get F 3.2 for the final answer.
vern, post: 329302, member: 3436 wrote: This one doesn't really matter but if there are no 1/100ths it won't show the zero.
For example the result is F 3.20, I get F 3.2 for the final answer.
Try Teresa's suggestion of formatting the cells. Highlight the cells and either right click or go to the format tool in the home ribbon, then from the format cells, number tab select the number of decimal places you want shown. Works for me.
Yep. The situation is this: when you append the C or F, the contents of the cell is no longer a number, it's text. So, you can't format a number of decimal places for that cell. You can solve that by putting the C or F in the adjacent cell to the left instead of appending it to the number and then formatting the cell that contains the number with two decimal places.
Suppose your numerical answer is in B150.
B150: =A133-F133
A150: =if(B150>0,"C","F")
Right justify A150 and left justify B150 so that the letters look appended. Format B150 as number with 2 decimal places.
I'm tired and I may have the signs reversed for the C and the F, but you get the idea.
Dependent upon the Excel version you are using one or the other or both will accomplish your objective.
=IF(A133>F133,"Cut "&TEXT(A133-F133,"0.00"),"Fill "&TEXT(F133-A133,"0.00"))
or
=IF(A133>F133,TEXT(A133-F133,"Cut 0.00"),TEXT(F133-A133,"Fill 0.00"))
Before getting into any other discussions about the problem presented in the original post:
There are two significant conditions affecting the desired solution.
1. The measurement precision is the same for all the points given.
This means all points have the same weight.
2. The measurement units for the position of both lines is the same.
This means the scale is unity.
Because there are only two points, only two measurements for each and that precisions are the same, it means the residuals for or at the transformed point locations will be equal. Excluding the probability the measurements between the one set of measurements and the other are exactly the same, because scale is unity, the values of the residuals will not be zero.
An item I believe is being overlooked is that in a rotation, it is completely irrelevant where the rotation point is located. To comply with mathematical convention, I use the term rotation point instead of pivot point.
In the solution by MathTeacher, it is stated "Note that one of the pivot points is the intersection point of the two lines. The other is the intersection of two circles." This is all well and good. However, any point in the plane can be used to rotate about. Regardless of the rotation point location, it is the rotation amount, determined by the difference in two line directions. that aligns one line with another - that is - makes them parallel. By making the lines parallel, the residuals, associated only with the rotation, are minimized. For two parallel lines in a plane the minimized distance between the two lines is produced by the shortest line which is the distance of a line normal to the two parallel lines.
To illustrate this, whether one uses pen and paper or a computer drafting program, one only has to draw two lines, one at a different direction than the other. Rotate one of the lines about any point by the difference in directions to make it parallel to the other. This shows that no matter what rotation point is used, if the lines are parallel, they are aligned along the same direction. It further illustrates the basic geometric theorem and its converse are true:
Parallel lines have the same direction and Two lines of the same direction are parallel.
Because of the conditions stated, the translation has to be from the mid-point of the rotated line to the mid-point of the other. If this is not the case, then the residuals will not be equal. As in the rotation case, this may be visualized by drawing on paper or the computer screen.
Using popsicle sticks, it is possible to physically reproduce the problem and solution. First, one stick is cut by a small amount and rounded. Then, both stick ends are labeled with 14 and 13 on one and 321 and 322 on the other and Mid-points are marked on each. Next the sticks are laid down on a table in an orientation approximating that in the problem presented in the original post. After this, the stick labeled 321 and 322 is rotated, using any rotation point, to be parallel with the stick labeled 14 an 13. Keeping the the stick labeled 321 and 322 in its rotated orientation slide, transpose, it to the stick labeled 14 and 13. This completes a physical representation of a least squares transformation of rotation and translation for two points. It is that simple and not any more complicated than that. Just why would anyone want to complicate such a simple solution? Why?
While solutions so far presented may be to determine some other desired objective, they circumvent the simplicity of the geometry of the originally desired solution. It is possible to fly from Los Angeles to Seattle by flying from Los Angeles to Mexico City then to Denver and finally to Seattle. However, simplicity is achieved by flying directly from Los Angeles to Seattle. If there are reasons to be in Mexico City and Denver, then that's what needs be done. If there are no reasons, why then fly to Mexico City and Denver?
A simpler method, as a result of a good night's sleep, for formatting Cut-and-Fill in Excel is:
---------
The formula in the cell showing results needs only be: A133-F133 and then,
format the cell
"Cut "0.00;"Fill "0.00;"Grade"
-- or to display with color,
[Red]"Cut "0.00;[Blue]"Fill "0.00;[Green]"Grade"
---------
Using this method takes advantage of Excels conditional formatting. In Excel, formats are delimited with a semicolon (;). The first item is the format if the value is greater than zero. The second is for values less than zero and the third, if the value is zero. A fourth format can be added for alpha values.
In the format presented above, "Cut" is the positive value format, "Fill " for the negative and "Grade" if zero.
MLSchumann, post: 329537, member: 471 wrote: A simpler method, as a result of a good night's sleep, for formatting Cut-and-Fill in Excel is:
Now that's an elegant solution! And the cut/fill value is preserved as a number if it's needed in later calculations.
MLSchumann, post: 329537, member: 471 wrote: A simpler method, as a result of a good night's sleep, for formatting Cut-and-Fill in Excel is:
---------
The formula in the cell showing results needs only be: A133-F133 and then,
format the cell
"Cut "0.00;"Fill "0.00;"Grade"
-- or to display with color,
[Red]"Cut "0.00;[Blue]"Fill "0.00;[Green]"Grade"
---------
Using this method takes advantage of Excels conditional formatting. In Excel, formats are delimited with a semicolon (;). The first item is the format if the value is greater than zero. The second is for values less than zero and the third, if the value is zero. A fourth format can be added for alpha values.In the format presented above, "Cut" is the positive value format, "Fill " for the negative and "Grade" if zero.
Now that is just slicker than snot on an onion!