openmolecules.org

 
Home » DataWarrior » Functionality » Round numbers by decimal places?
Round numbers by decimal places? [message #2445] Wed, 19 November 2025 22:23 Go to next message
Santora V is currently offline  Santora V
Messages: 8
Registered: March 2024
Junior Member
Is there a simple way to round numbers by decimal places rather than significant figures? I have a column with values that range from 1 to several digits (first list below), and I want to round them as shown in the 2nd list.

Perhaps a find and replace search?

Thanks!

1.1
11.2
11.6
101.2
101.6

Round to:
1
11
12
101
102
Re: Round numbers by decimal places? [message #2446 is a reply to message #2445] Thu, 20 November 2025 13:39 Go to previous messageGo to next message
amorrison
Messages: 39
Registered: March 2016
Member
Hi,

If you don't mind an extra column you can use "Add Calculated Values" to round numbers.

Rounded Value - round(x, scale).

Best,

Angus
Re: Round numbers by decimal places? [message #2447 is a reply to message #2446] Fri, 21 November 2025 02:04 Go to previous message
Santora V is currently offline  Santora V
Messages: 8
Registered: March 2024
Junior Member
Thanks, Angus.

I'm aware of this option, but would like to include the change in a macro for any/all columns rather than create multiple calculated columns.
Previous Topic: Transposing with structures
Goto Forum:
  


Current Time: Sat Nov 22 10:21:39 CET 2025

Total time taken to generate the page: 0.27768 seconds