ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Removing Decimals and Calculating Prime Number Fields (https://www.excelbanter.com/excel-discussion-misc-queries/255912-removing-decimals-calculating-prime-number-fields.html)

Data Analyst

Removing Decimals and Calculating Prime Number Fields
 
I'm using the following formula to remove decimals from my fields (ex.
1000.02.09.03):

=LEFT(A1,FIND(".",A1)-1)

I need to include in it the fields that don't have decimals (ex. 1000) to be
calculated as is instead of receiving the error message #VALUE!

Data Analyst

Removing Decimals and Calculating Prime Number Fields
 
=LEFT(A1,FIND(".",A1,1)-1) doesn't work...anything else?

"Data Analyst" wrote:

I'm using the following formula to remove decimals from my fields (ex.
1000.02.09.03):

=LEFT(A1,FIND(".",A1)-1)

I need to include in it the fields that don't have decimals (ex. 1000) to be
calculated as is instead of receiving the error message #VALUE!


T. Valko

Removing Decimals and Calculating Prime Number Fields
 
see your other post

--
Biff
Microsoft Excel MVP


"Data Analyst" wrote in message
...
=LEFT(A1,FIND(".",A1,1)-1) doesn't work...anything else?

"Data Analyst" wrote:

I'm using the following formula to remove decimals from my fields (ex.
1000.02.09.03):

=LEFT(A1,FIND(".",A1)-1)

I need to include in it the fields that don't have decimals (ex. 1000) to
be
calculated as is instead of receiving the error message #VALUE!




Fred Smith[_4_]

Removing Decimals and Calculating Prime Number Fields
 
To remove the decimals (as requested), use Substitute. For example, to
change it to the number 1000020903, use:
=--substitute(a1,".","")

Regards,
Fred

"Data Analyst" wrote in message
...
I'm using the following formula to remove decimals from my fields (ex.
1000.02.09.03):

=LEFT(A1,FIND(".",A1)-1)

I need to include in it the fields that don't have decimals (ex. 1000) to
be
calculated as is instead of receiving the error message #VALUE!



Data Analyst

Removing Decimals and Calculating Prime Number Fields
 
Found it! It's =LEFT(A1,6)

6 is the number of characters that will be used from Left to Right

"Data Analyst" wrote:

=LEFT(A1,FIND(".",A1,1)-1) doesn't work...anything else?

"Data Analyst" wrote:

I'm using the following formula to remove decimals from my fields (ex.
1000.02.09.03):

=LEFT(A1,FIND(".",A1)-1)

I need to include in it the fields that don't have decimals (ex. 1000) to be
calculated as is instead of receiving the error message #VALUE!


Fred Smith[_4_]

Removing Decimals and Calculating Prime Number Fields
 
Why not =left(a1,4)? That will give you the same value.

Also, Left returns text. If you want to use it as a number in calculations,
use:
=--left(a1,4)

I still think you are better off checking for the decimal point, as shown in
previous posts.

Regards,
Fred

"Data Analyst" wrote in message
...
Found it! It's =LEFT(A1,6)

6 is the number of characters that will be used from Left to Right

"Data Analyst" wrote:

=LEFT(A1,FIND(".",A1,1)-1) doesn't work...anything else?

"Data Analyst" wrote:

I'm using the following formula to remove decimals from my fields (ex.
1000.02.09.03):

=LEFT(A1,FIND(".",A1)-1)

I need to include in it the fields that don't have decimals (ex. 1000)
to be
calculated as is instead of receiving the error message #VALUE!




All times are GMT +1. The time now is 05:32 PM.

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