I think you can do what you need with Conditional Formatting.
It will not actually truncate the values to 0 decimals, but you should
be able to format them to display only 2 decimals.
You need to create a named Cell Format for each display type, then use
Conditional Formatting to set the desired format based on cell value.
On 4/14/25 23:21, mike.junk.46@att.net wrote:
Where do I fnd documentation of range.createReplaceDescriptor?
Hopefully that will cover how the descriptor works.
In a spreadsheet tracking stock prices I'm currently indexing through
columns setting number formats at 2 decimals if less than $100 and 0
decimals if larger. It works but is slow. Reading through Pitonyak's
OOME again I noticed his example of a replaceDescriptor changing text
I'd like to use it for changing number formats if possible.
Another task I do walking through a range of figures is to color cell
number red if it is less thsn yesterday's quote.
If search returns a range and replace will work on that range
I think things would go much faster.
A second but related question is the docs on
range.createSearchDescriptor.
Thanks,
Mike
--
How much is foreign government agitprop driving conspiracy theories
and anti-vaccine conversations?
-MM
--
To unsubscribe e-mail to: users+unsubscribe@global.libreoffice.org
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy
Context
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.