Any idea how to do this?

agonysWeeper

Board Regular
Joined
Feb 4, 2011
Messages
146
I have image below which is C1 and D1 has the formula, the formula for C1 is simply =99/A1 then the result 1.8, what I need is just the whole number 1, I want those decimal point ".8" will removed. any one can help me out of here? thanks.
81272066.png
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number

Peter_SSs

MrExcel MVP, Moderator
Joined
May 28, 2005
Messages
50,515
Office Version
  1. 365
Platform
  1. Windows

ADVERTISEMENT

If you want to simply chop off the decimal part then there is
=TRUNC(A1/99,0)
or just
=TRUNC(A1/99)
since the default number of decimal places for TRUNC is 0.

This could be relevant to you if it is possible that the value being shortened (99/A1 in your case) is negative. For example,
=INT(-7.2) = -8
=FLOOR(-7.2,1) = -8
but
=TRUNC(-7.2) = -7
 

agonysWeeper

Board Regular
Joined
Feb 4, 2011
Messages
146
I don't understand why =INT(-7.2) show the answer -8
while =TRUNC(-7.2) is -7. I did a simply =(-7/2) then the answer is "3.5" so means the INT rounded it off "4" while TRUNC just rounded it off "3".
 

agonysWeeper

Board Regular
Joined
Feb 4, 2011
Messages
146

ADVERTISEMENT

Alright, I think "TRUNC" is more okay.
=TRUNC(99/-7) = -14
=INT(99/-7) = -15
=(99/-7) = 14.14285714 (basic)
 

Peter_SSs

MrExcel MVP, Moderator
Joined
May 28, 2005
Messages
50,515
Office Version
  1. 365
Platform
  1. Windows
I don't understand why =INT(-7.2) show the answer -8
while =TRUNC(-7.2) is -7. I did a simply =(-7/2) then the answer is "3.5" so means the INT rounded it off "4" while TRUNC just rounded it off "3".
People are often misled by the name of the INT() function. INT is short for integer but it is because the function returns an integer, not because it returns the integer part of its argument. From the Help on INT:
Description
Rounds a number down to the nearest integer.
So rounding -7.2 down to the nearest integer gives -8.


Whereas for TRUNC():
Description
Truncates a number to an integer by removing the fractional part of the number.
 

Dryver14

Well-known Member
Joined
Mar 22, 2010
Messages
2,396
I don't understand why you are questioning the maths when in your original post you said you wanted 1.8 to be 1 which surprised me if you wanted it to be above 0.5 to read up or below 0.5 to read down then
the round function would ahve worked.

=ROUND(C1)
 

Forum statistics

Threads
1,141,019
Messages
5,703,766
Members
421,315
Latest member
awaisnazir139

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top