[Solved] Calculated % in one cell <> identical % Etered in another cell

Discuss the spreadsheet application
Locked
DWDun
Posts: 111
Joined: Thu Aug 29, 2019 11:08 pm
Location: OK

[Solved] Calculated % in one cell <> identical % Etered in another cell

Post by DWDun »

Is there a secret to getting a return of TRUE when testing for equality between a calculated percent in one cell and an identical entered percent in another cell? Both cells have the same formatting, the only difference is one is a keyboard entry, one is the result of a calculation. Puzzling.
Last edited by floris v on Sun Mar 02, 2025 8:33 pm, edited 2 times in total.
Reason: Tagged Solved as per OP's last post
Open Office 4.1.15, Windows 11
User avatar
Hagar Delest
Moderator
Posts: 33629
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Calculated % in one cell <> identical % Etered in another cell

Post by Hagar Delest »

If the 2 cells are for example A1 and B1, try:
=A1=B1

If it doesn't work, please upload a sample file to show what is the context exactly.

Please add [Solved] at the beginning of the title in your first post (top of the topic) with the button if your issue has been fixed.
LibreOffice 25.2 on Linux Mint Debian Edition (LMDE 7 Gigi) and 25.2 portable on Windows 11.
User avatar
floris v
Volunteer
Posts: 4635
Joined: Wed Nov 28, 2007 1:21 pm
Location: Netherlands

Re: Calculated % in one cell <> identical % Etered in another cell

Post by floris v »

If Hagar Delest's method doesn't work (might be because of different rounding), try =(A1-B1) < 0.0001 or another small number.
LibreOffice 25.8.4.2 on Ubuntu Linux
If your problem has been solved or your question has been answered, please edit the first post in this thread and add [Solved] to the title bar.
Nederlandstalig forum
Alex1
Volunteer
Posts: 852
Joined: Fri Feb 26, 2010 1:00 pm
Location: Netherlands, EU

Re: Calculated % in one cell <> identical % Etered in another cell

Post by Alex1 »

=ABS(A1-B1)<0.0001
AOO 4.1.16 & LO 25.8.3 on Windows 10
User avatar
Lupp
Volunteer
Posts: 3756
Joined: Sat May 31, 2014 7:05 pm
Location: München, Germany

Re: Calculated % in one cell <> identical % Etered in another cell

Post by Lupp »

DWDun wrote: Sun Mar 02, 2025 12:13 am ... Both cells have the same formatting, the only difference is one is a keyboard entry, one is the result of a calculation...
@Alex1 already showed a possible way to a solution.
Pointing out the central fact: Rounding isn't done by formatting, but -where needed- with the help of the ROUND() function. Formatting only does something like rounding for the view without changing the value of the cell it's applied to.
===
If somebody tells you that there is an option "Precision as shown": don't enable it. It comes with lots of disadvantages!
===
aoo112552RoundingRatiosShownAsPercentages.ods
(12.59 KiB) Downloaded 52 times
On Windows 10: LibreOffice 25.8.4 and older versions, PortableOpenOffice 4.1.7 and older, StarOffice 5.2
---
Lupp from München
DWDun
Posts: 111
Joined: Thu Aug 29, 2019 11:08 pm
Location: OK

Re: Calculated % in one cell <> identical % Etered in another cell

Post by DWDun »

Problem SOLVED. It was the rounding that was the problem. Thank you for your help.
Open Office 4.1.15, Windows 11
Locked