We’d like to remind Forumites to please avoid political debate on the Forum.
This is to keep it a safe and useful space for MoneySaving discussions. Threads that are – or become – political in nature may be removed in line with the Forum’s rules. Thank you for your understanding.
📨 Have you signed up to the Forum's new Email Digest yet? Get a selection of trending threads sent straight to your inbox daily, weekly or monthly!
excel formula not giving the correct answer
Comments
-
A4 =INT((A2-A3*96)/8+1/16) seems to work for your example but 1.523 gives 4' 12 0/8" so more refinement needed.Stompa said:
Though if you have 1.473 in A1 you get 4' 9 8/8". Whilst you could argue that that is correct, it's an odd way of writing it!WaywardDriver said:First decide what precision you want. e.g. to nearest 1/8". Then if 1.45 in cell A1:
A2 =8*CONVERT(A1,"m","in") gives 456.69 (1/8th of inches)
A3 =INT(A2/96) gives 4 (feet)
A4 =INT((A2-A3*96)/8) gives 9 (inches)
A5 =INT(0.5+A2-A3*96-A4*8) gives 1 (nearest 1/8inch)
With some effort may be possible to combine into single formula.
0 -
I suspectWaywardDriver said:
Some refinement needed then!Stompa said:
Though if you have 1.473 in A1 you get 4' 9 8/8". Whilst you could argue that that is correct, it's an odd way of writing it!WaywardDriver said:First decide what precision you want. e.g. to nearest 1/8". Then if 1.45 in cell A1:
A2 =8*CONVERT(A1,"m","in") gives 456.69 (1/8th of inches)
A3 =INT(A2/96) gives 4 (feet)
A4 =INT((A2-A3*96)/8) gives 9 (inches)
A5 =INT(0.5+A2-A3*96-A4*8) gives 1 (nearest 1/8inch)
With some effort may be possible to combine into single formula.
A2 =ROUND(8*CONVERT(A1,"m","in"),0)
A3 =INT(A2/96)
A4 =INT((A2-A3*96)/8)
A5 =INT(A2-A3*96-A4*8)
would be sufficient.Stompa0 -
It may give 4'9.086616" but it still shows (in excel) in the cell as 4'9" whereas if I open the saved spreadsheet in LibraOffice it shows as 4'9 1/9"debitcardmayhem said:no it gives 4'9.086616"
I want to see 4'9 1/8" (or 4'9 1/9" if it is more accurate) in the cell in excel.
This is excel4.76 4' 9"4.76 4' 9"5.81 5' 9 2/3"3.28 3' 3 1/3"3.28 3' 3 1/3"3.80 3' 9 2/3"3.80 3' 9 2/3"3.80 3' 9 2/3"
and this is the same spreadsheet opened in LibreOffice4.76 4' 9 1/9"4.76 4' 9 1/9"5.81 5' 9 2/3"3.28 3' 3 3/8"3.28 3' 3 3/8"3.80 3' 9 2/3"3.80 3' 9 2/3"3.80 3' 9 2/3"0 -
Read here perhaps https://support.microsoft.com/en-us/office/display-numbers-as-fractions-0121ecac-1773-4f2d-8cd3-7db51fd83b77
4.8kWp 12x400W Longhi 9.6 kWh battery Giv-hy 5.0 Inverter, WSW facing Essex . Aint no sunshine ☀️ Octopus gas fixed dec 24 @ 5.74 tracker again+ Octopus Intelligent Flux leccy0 -
It doesn't explain the discrepancy between excel and LibreOffice though.debitcardmayhem said:0 -
Seems spreadsheet precision bit of a minefield, see for example http://www.gnumeric.org/numerical-issues.html which indirectly contrasts Excel and LibreOffice calculation precision.st999 said:
It doesn't explain the discrepancy between excel and LibreOffice though.debitcardmayhem said:
Would be useful to know what OP is trying to achieve - academic or real-life exercise? if latter then convert to what precision?0 -
I just wondered why using excel if I put 4.76 in a cell and get 4' 9 1/8" yet if I did the same calculation using 1.45*3.28 which also shows in the cell as 4.76 I get 4' 9" and if there was a way to fix it?WaywardDriver said:Would be useful to know what OP is trying to achieve - academic or real-life exercise? if latter then convert to what precision?
0 -
The fundamental issue is to do with accuracy of the original figures i.e. 1.45 is to 3 significant figures so the answer should be also. Excel gives 1.45*3.28 as 4.756 which we should express as 4.76 to reflect the accuracy of the original measurement.st999 said:
I just wondered why using excel if I put 4.76 in a cell and get 4' 9 1/8" yet if I did the same calculation using 1.45*3.28 which also shows in the cell as 4.76 I get 4' 9" and if there was a way to fix it?WaywardDriver said:Would be useful to know what OP is trying to achieve - academic or real-life exercise? if latter then convert to what precision?
To look at this another way, by expressing the measurement as 1.45m we're implying it's between 1.445 and 1.455 which according to the Excel formula I used corresponds to between 4' 8 7/8" and 4' 9 2/8". This difference of 3/8" makes any difference in precision between how Excel and LibreOffice do calculations somewhat academic.0 -
The fundamental issue is that 1.45 x 3.28 = 4.756 and not 4.76 ... 4.76 only show if you've set the cell formatting to 2 decimal places. The calculation still uses the 4.756 answer.0
-
If I add another column and roundup the answer to 1.45 x 3.28 = 4.756 and use that column I then get 4' 9 1/8" so basically it is a roundup error.
4.76 4.76 4' 9" 4' 9 1/8" 4.76 4.76 4' 9" 4' 9 1/8" 5.81 5.81 5' 9 2/3" 5' 9 5/7" 3.28 3.28 3' 3 1/3" 3' 3 1/3" 3.28 3.28 3' 3 1/3" 3' 3 1/3" 3.80 3.81 3' 9 2/3" 3' 9 5/7" 3.80 3.81 3' 9 2/3" 3' 9 5/7" 3.80 3.81 3' 9 2/3" 3' 9 5/7" 0
Confirm your email address to Create Threads and Reply
Categories
- All Categories
- 352.3K Banking & Borrowing
- 253.6K Reduce Debt & Boost Income
- 454.3K Spending & Discounts
- 245.3K Work, Benefits & Business
- 601K Mortgages, Homes & Bills
- 177.5K Life & Family
- 259.1K Travel & Transport
- 1.5M Hobbies & Leisure
- 16K Discuss & Feedback
- 37.7K Read-Only Boards
