ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   use only PART of a # in excel? (https://www.excelbanter.com/excel-discussion-misc-queries/56521-use-only-part-excel.html)

[email protected]

use only PART of a # in excel?
 
OK I know this might sound like a strange question. But I am trying to
write a formula for a machine that I have in my factory. It is a multi
step formula, and in one of the steps it will give a result, for
example, of 127.6543. Is there ANY possible way for me to ask the
next part of the formula to ONLY use the .6543 without taking the 127
into account, or without having to tell it to subtract the 127 manually
(and ALSO vice versa meaning I need it to then use ONLY the 127 and NOT
the .6543) ?? I hope I am making myself clear, because Im not even
sure that I understand what I am asking now that I look at it, but
since I am not versed in excel, I am hoping some intelligent soul will
understand my query.

Thanks in advance,
Scott


Jim Sweet

use only PART of a # in excel?
 
Sounds to me like you need to check two separate but related functions in
Excel.

If x= 127.6543

INT(x) = 127 INT returns just the integer part of a number

Also,

if x = 127.6543

MOD(x, INT(x)) = .6543 MOD() returns the fraction after the decimal
remaining after dividing by the second argument, in this case INT(x). Note
that I've used INT to return the whole integer part and used it as the
divisor.

This should be a reliable mathematical method, but I would bet there's also
a reliable text function method to do this.

Hope that helps.

" wrote:

OK I know this might sound like a strange question. But I am trying to
write a formula for a machine that I have in my factory. It is a multi
step formula, and in one of the steps it will give a result, for
example, of 127.6543. Is there ANY possible way for me to ask the
next part of the formula to ONLY use the .6543 without taking the 127
into account, or without having to tell it to subtract the 127 manually
(and ALSO vice versa meaning I need it to then use ONLY the 127 and NOT
the .6543) ?? I hope I am making myself clear, because Im not even
sure that I understand what I am asking now that I look at it, but
since I am not versed in excel, I am hoping some intelligent soul will
understand my query.

Thanks in advance,
Scott



Suresh

use only PART of a # in excel?
 
If cell A1 is 127.6543 then =Trunc(A1,0) will give 127. For .6543 use
=A1-Trunc(A1,0)

" wrote:

OK I know this might sound like a strange question. But I am trying to
write a formula for a machine that I have in my factory. It is a multi
step formula, and in one of the steps it will give a result, for
example, of 127.6543. Is there ANY possible way for me to ask the
next part of the formula to ONLY use the .6543 without taking the 127
into account, or without having to tell it to subtract the 127 manually
(and ALSO vice versa meaning I need it to then use ONLY the 127 and NOT
the .6543) ?? I hope I am making myself clear, because Im not even
sure that I understand what I am asking now that I look at it, but
since I am not versed in excel, I am hoping some intelligent soul will
understand my query.

Thanks in advance,
Scott



Ron Rosenfeld

use only PART of a # in excel?
 
On Mon, 21 Nov 2005 10:15:20 -0800, Jim Sweet
wrote:

if x = 127.6543

MOD(x, INT(x)) = .6543



OR, simpler:

=MOD(x,1)


--ron

[email protected]

use only PART of a # in excel?
 

Jim Sweet wrote:
Sounds to me like you need to check two separate but related functions in
Excel.

If x= 127.6543

INT(x) = 127 INT returns just the integer part of a number

Also,

if x = 127.6543

MOD(x, INT(x)) = .6543 MOD() returns the fraction after the decimal
remaining after dividing by the second argument, in this case INT(x). Note
that I've used INT to return the whole integer part and used it as the
divisor.

This should be a reliable mathematical method, but I would bet there's also
a reliable text function method to do this.

Hope that helps.

" wrote:

OK I know this might sound like a strange question. But I am trying to
write a formula for a machine that I have in my factory. It is a multi
step formula, and in one of the steps it will give a result, for
example, of 127.6543. Is there ANY possible way for me to ask the
next part of the formula to ONLY use the .6543 without taking the 127
into account, or without having to tell it to subtract the 127 manually
(and ALSO vice versa meaning I need it to then use ONLY the 127 and NOT
the .6543) ?? I hope I am making myself clear, because Im not even
sure that I understand what I am asking now that I look at it, but
since I am not versed in excel, I am hoping some intelligent soul will
understand my query.

Thanks in advance,
Scott





All times are GMT +1. The time now is 07:00 PM.

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