Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10
Default 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!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10
Default 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!

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default 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!



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,389
Default 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!


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10
Default 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!



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,389
Default 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!


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Largest Prime Number Gary''s Student Excel Discussion (Misc queries) 10 November 24th 08 01:26 AM
prime number danpt Excel Discussion (Misc queries) 8 October 10th 08 05:07 PM
An add-in that allows you to find the highest prime in a number [email protected] Excel Discussion (Misc queries) 1 April 12th 06 01:06 AM
How do I test for a prime number? Stephen P Thomas Excel Worksheet Functions 3 July 13th 05 11:43 PM
Prime number puzzle johnT Excel Worksheet Functions 3 February 28th 05 12:39 AM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"