ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How do I add TRUNC to an existing formular? (https://www.excelbanter.com/excel-discussion-misc-queries/104053-how-do-i-add-trunc-existing-formular.html)

Preplexed

How do I add TRUNC to an existing formular?
 
I have this in a cell and want to TRUNC the results
=(($A6*$B$3)-D$5)/($B$3-D$5)

Tom Hutchins

How do I add TRUNC to an existing formular?
 
=TRUNC((($A6*$B$3)-D$5)/($B$3-D$5),0) truncates to zero decimal places,
=TRUNC((($A6*$B$3)-D$5)/($B$3-D$5),1) truncates to one decimal place,
etc.

Hope this helps,

Hutch

"Preplexed" wrote:

I have this in a cell and want to TRUNC the results
=(($A6*$B$3)-D$5)/($B$3-D$5)


folderol

How do I add TRUNC to an existing formular?
 

Code:
--------------------

=trunc((($A6*$B$3)-D$5)/($B$3-D$5),0)
or
=int((($A6*$B$3)-D$5)/($B$3-D$5))
or
=round((($A6*$B$3)-D$5)/($B$3-D$5),0)

--------------------


If you look trunc() up in help it discusses the differences. Trunc
supports precision, so you can truncate at any decimal position, while
int truncates all the decimal positions.

Tom


--
folderol
------------------------------------------------------------------------
folderol's Profile: http://www.excelforum.com/member.php...o&userid=37288
View this thread: http://www.excelforum.com/showthread...hreadid=570022


Preplexed

How do I add TRUNC to an existing formular?
 
Thank you that did the trick

"Tom Hutchins" wrote:

=TRUNC((($A6*$B$3)-D$5)/($B$3-D$5),0) truncates to zero decimal places,
=TRUNC((($A6*$B$3)-D$5)/($B$3-D$5),1) truncates to one decimal place,
etc.

Hope this helps,

Hutch

"Preplexed" wrote:

I have this in a cell and want to TRUNC the results
=(($A6*$B$3)-D$5)/($B$3-D$5)



All times are GMT +1. The time now is 08:29 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com