Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 33
Default spliting whole number and decimal

Hi there,
I have some questions kinda cirle the same issue...so just bear with me he

If my cell A1 has number 1234.56, and I want cell B1 contains 1234 and cell
B2 contains .56, How do I do that?

How do I do the same thing if there are 3 decimal places.. i.e 123.456

What happen if the format in cell A1 is a text? Can the splitting be done?

Thanks.

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default spliting whole number and decimal

Hi,

In B1
=INT(A1)

and in b2
=A1-INT(A1)

Mike

"Don Doan" wrote:

Hi there,
I have some questions kinda cirle the same issue...so just bear with me he

If my cell A1 has number 1234.56, and I want cell B1 contains 1234 and cell
B2 contains .56, How do I do that?

How do I do the same thing if there are 3 decimal places.. i.e 123.456

What happen if the format in cell A1 is a text? Can the splitting be done?

Thanks.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,942
Default spliting whole number and decimal

another way....
in b1, enter =A1-MOD(A1,1)
in b2. enter =MOD(A1,1)

regards
FSt1

"Don Doan" wrote:

Hi there,
I have some questions kinda cirle the same issue...so just bear with me he

If my cell A1 has number 1234.56, and I want cell B1 contains 1234 and cell
B2 contains .56, How do I do that?

How do I do the same thing if there are 3 decimal places.. i.e 123.456

What happen if the format in cell A1 is a text? Can the splitting be done?

Thanks.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 905
Default spliting whole number and decimal

"Don Doan" wrote:
How do I do the same thing if there are 3 decimal places.. i.e 123.456
What happen if the format in cell A1 is a text? Can the splitting be done?


The following should work in all cases:

B1: =INT(--A1)

B2: =A1 - B1

The formula in B1 does assume that if A1 is text, it is recognizable as a
number. If B1 results in a #VALUE! error, that assumption is wrong. In
that case, we may need to see exactly what text is in A1.


----- original message -----

"Don Doan" wrote in message
...
Hi there,
I have some questions kinda cirle the same issue...so just bear with me
he

If my cell A1 has number 1234.56, and I want cell B1 contains 1234 and
cell
B2 contains .56, How do I do that?

How do I do the same thing if there are 3 decimal places.. i.e 123.456

What happen if the format in cell A1 is a text? Can the splitting be done?

Thanks.


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 905
Default spliting whole number and decimal

PS....

I wrote:
The following should work in all cases:
B1: =INT(--A1)


Apparenty, "--" is unneeded with INT. INT(A1) should work for text as well
as numbers.

Sigh, I wish Excel were not so inconsistent, although it works in your favor
this time.


----- original message -----

"Joe User" <joeu2004 wrote in message
...
"Don Doan" wrote:
How do I do the same thing if there are 3 decimal places.. i.e 123.456
What happen if the format in cell A1 is a text? Can the splitting be
done?


The following should work in all cases:

B1: =INT(--A1)

B2: =A1 - B1

The formula in B1 does assume that if A1 is text, it is recognizable as a
number. If B1 results in a #VALUE! error, that assumption is wrong. In
that case, we may need to see exactly what text is in A1.


----- original message -----

"Don Doan" wrote in message
...
Hi there,
I have some questions kinda cirle the same issue...so just bear with me
he

If my cell A1 has number 1234.56, and I want cell B1 contains 1234 and
cell
B2 contains .56, How do I do that?

How do I do the same thing if there are 3 decimal places.. i.e 123.456

What happen if the format in cell A1 is a text? Can the splitting be
done?

Thanks.





  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 12
Default spliting whole number and decimal

Another way to do this is to use the Text to Columns Wizard. Place your
cursor in the column containing the content to be separated, then select Text
to Columns (in Excel 2007 it is in the Data/Data Tools ribbon; in Excel 2003
it is under Tools).

Following are the responses to the prompts:
€”Original data type = delimited (click on Next)
€”Delimeters = Check other (make sure all other options are unchecked). Enter
a period in the box (click on Next)
€”Column Data Format = General
€”Destination = the two cells in which the final results will be placed. The
cell in which your original data resides is shown. Highlight it and then
click in the two cells in your spreadsheet in which you want the final
results to be placed. (Click on Finish)

This works no matter how many numbers you have after the decimal (period) or
whatever you choose for your separator.


"Don Doan" wrote:

Hi there,
I have some questions kinda cirle the same issue...so just bear with me he

If my cell A1 has number 1234.56, and I want cell B1 contains 1234 and cell
B2 contains .56, How do I do that?

How do I do the same thing if there are 3 decimal places.. i.e 123.456

What happen if the format in cell A1 is a text? Can the splitting be done?

Thanks.

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
how to correct the decimal number to the nearest even number santosh kutre Excel Worksheet Functions 3 November 3rd 08 04:04 PM
Converting 2-place decimal value to floating point decimal number with leading zero Kermit Piper Excel Discussion (Misc queries) 3 March 18th 06 06:20 PM
Spliting a number with leading zeros haitch2 Excel Discussion (Misc queries) 7 September 30th 05 12:09 AM
converting number string to number with decimal rortiz Excel Worksheet Functions 2 September 15th 05 08:34 PM
How to convert a decimal number to a non-decimal number? snickers22 Excel Worksheet Functions 4 January 13th 05 10:04 PM


All times are GMT +1. The time now is 03:49 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"