Table sum roundup

Table sum roundup

gandi.nbgd
Contributor Contributor
4,161 Views
14 Replies
Message 1 of 15

Table sum roundup

gandi.nbgd
Contributor
Contributor

Hello,

I need some help with rounding sum numbers in autocad table. Tried some things like round() and trunc(), but it doesn't work, or I'm doing something wrong.

All this areas are linked to hatch in model, and their field looks like this: (with conversion factor of 0.0001 (cm2-m2))

gandinbgd_1-1650030684769.png

 

All I need is simple thing at first, sum at the end to use this two decimal numbers when doing the math, and not the whole 164.366344 for example. So end result needs to be 2420.61 instead of 2420.59.

gandinbgd_0-1650030477961.png

Thanks in advance!

0 Likes
Accepted solutions (1)
4,162 Views
14 Replies
Replies (14)
Message 2 of 15

Patchy
Mentor
Mentor

It works that way same as excel.

 

0 Likes
Message 3 of 15

JTBWorld
Advisor
Advisor

Try something like this:

round(a1*100)/100 +round(a2*100)/100 +round(a3*100)/100


Jimmy Bergmark
JTB World - Software development and consulting for CAD and license usage reports
https://jtbworld.com

0 Likes
Message 4 of 15

gandi.nbgd
Contributor
Contributor

No luck, same wrong number

0 Likes
Message 5 of 15

JTBWorld
Advisor
Advisor

Can you upload a sample DWG? 


Jimmy Bergmark
JTB World - Software development and consulting for CAD and license usage reports
https://jtbworld.com

0 Likes
Message 6 of 15

gandi.nbgd
Contributor
Contributor

Here is one example of this problem

0 Likes
Message 7 of 15

cadffm
Consultant
Consultant

Autocad fields alway calculate with the real values, not with your display values

Sebastian

0 Likes
Message 8 of 15

JTBWorld
Advisor
Advisor
Accepted solution

You need to use this:

=round(b1*0.01)/0.01 +round(b2*0.01)/0.01 +round(b3*0.01)/0.01+round(b4*0.01)/0.01


Jimmy Bergmark
JTB World - Software development and consulting for CAD and license usage reports
https://jtbworld.com

0 Likes
Message 9 of 15

gandi.nbgd
Contributor
Contributor

Worked, thank you very much !

0 Likes
Message 10 of 15

st19675
Explorer
Explorer

Hello to everyone,

Thank god finally found the solution to a similar problem I have.

Hope someone can solve my problem:

I have a table with Object Area Fields inside. Also I have a column sum. I would like to roundup numbers like: 82.09 to 82.10, 1.66 to 1.70, 83.03 to 83.00....

Hope someone can help me.

Thanks a lot in advance 🙂

 

table example problem.JPG

0 Likes
Message 11 of 15

JTBWorld
Advisor
Advisor

Round 83.03 to 83.00 or 84.00?


Jimmy Bergmark
JTB World - Software development and consulting for CAD and license usage reports
https://jtbworld.com

0 Likes
Message 12 of 15

st19675
Explorer
Explorer

Thank you for your fast answer Jimmy,

I need to round up  from 0.05 up or round down from 0.04 down, as for example: 73.91 to 73.90, 75.56 to 75.60, 5.25 to 5.30, etc

 

Thanks a LOT 🙂

0 Likes
Message 13 of 15

JTBWorld
Advisor
Advisor

That would be like this: round(A1*10)/10


Jimmy Bergmark
JTB World - Software development and consulting for CAD and license usage reports
https://jtbworld.com

0 Likes
Message 14 of 15

st19675
Explorer
Explorer


Finally it worked like this:

ROUND(A1/0.05)*0.05

Thank you very much!

Message 15 of 15

wquevedoPBBV4
Participant
Participant
Thank you so much.
0 Likes