decimals only.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,
I have a requirement to ignore the whole number in a sum and just use the
decimals. To be more specific if I can get 6.54 lengths of metal from a bar
length of 4000mm what size is the offcut?
I can find lots of info on ignoring the decimal but none on ignoring the
whole number.
Any help appreciated!
 
When I have to get the decimal, I just use a formula. Say:-
A1 = 6.54
A2 will contain the offshoot fraction/decimal 0.54

Put into A2 " = a1-trunc(a1,0) "

which will give you 0.54. Just reply if it doesn't work and i'll try and help.
 
Hi,

you can use formula:
=A1-INT(A1)
if the number is in cell A1 to get number as 0,54 or
=(A1-INT(A1))*100
to get 54

Regards,
Nika Lampe

"joepose" je napisal:
 
Hi joepose,

Have a look at the TRUNC and INT functions in help.

With 6.54 in A1
=A1-TRUNC(A1) will equal 0.54
=A1-INT(A1) will equal 0.54

HTH
Martin
 
MartinW said:
Hi joepose,

Have a look at the TRUNC and INT functions in help.

With 6.54 in A1
=A1-TRUNC(A1) will equal 0.54
=A1-INT(A1) will equal 0.54

As will MOD(A1,1)
 
You have been given some good replies but please note if A1 = -1.56 then
=A1-TRUNC(A1) gives -0.56 (negative)
but
=A1-INT(A1) gives 0.46 (positive)
best wishes
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top