Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default How do I extract the decimal places from a number in excel?

I need to produce a spreadsheet that rights the example: 1,245.89 as one two
four five 89. I've tried the left and right formulaes and the len one but the
numbers will change in length and may have zero decimals at the end too. Not
sure how to set this up now. Need the numbers in seperate cells, currently
have the following formula for the second number and so forth:
RIGHT(LEFT(B3,2),1)

Any help would be much appreciated.

Many thanks.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default How do I extract the decimal places from a number in excel?

Hi,

Do the two formula do what you want

=INT(B3)
=MOD(B3,1)

Mike

"Marli" wrote:

I need to produce a spreadsheet that rights the example: 1,245.89 as one two
four five 89. I've tried the left and right formulaes and the len one but the
numbers will change in length and may have zero decimals at the end too. Not
sure how to set this up now. Need the numbers in seperate cells, currently
have the following formula for the second number and so forth:
RIGHT(LEFT(B3,2),1)

Any help would be much appreciated.

Many thanks.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default How do I extract the decimal places from a number in excel?

Try this UDF (User Defined function). From workbook launch VBE using Alt+F11.
From menu Insert a Module and paste the below function.Close and get back to
workbook and try the below formula.

Function NumToText(strData As Variant) As String
Dim arrText As Variant
arrText = Array("Zero", "One", "Two", "Three", _
"Four", "Five", "Six", "Seven", "Eight", "Nine")
For intPos = 1 To InStr(strData & ".", ".")
If IsNumeric(Mid(strData, intPos, 1)) Then
NumToText = NumToText & " " & arrText(Mid(strData, intPos, 1))
End If
Next
NumToText = Mid(NumToText, 2) & " " & _
Mid(strData, InStr(strData & ".", ".") + 1)
End Function


--
Jacob


"Marli" wrote:

I need to produce a spreadsheet that rights the example: 1,245.89 as one two
four five 89. I've tried the left and right formulaes and the len one but the
numbers will change in length and may have zero decimals at the end too. Not
sure how to set this up now. Need the numbers in seperate cells, currently
have the following formula for the second number and so forth:
RIGHT(LEFT(B3,2),1)

Any help would be much appreciated.

Many thanks.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,766
Default How do I extract the decimal places from a number in excel?

Hi,

you may try this in cell F24. C24 has 1245.89. Copy this formula to the
right.

=MID($C$24,COLUMNS($F23:F23),1)

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com

"Marli" wrote in message
...
I need to produce a spreadsheet that rights the example: 1,245.89 as one
two
four five 89. I've tried the left and right formulaes and the len one but
the
numbers will change in length and may have zero decimals at the end too.
Not
sure how to set this up now. Need the numbers in seperate cells, currently
have the following formula for the second number and so forth:
RIGHT(LEFT(B3,2),1)

Any help would be much appreciated.

Many 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
Chart Number Decimal Places John Excel Discussion (Misc queries) 6 July 2nd 09 08:17 PM
Setting the number of decimal places for a text box. Aaron1978 Excel Discussion (Misc queries) 3 March 8th 06 04:59 PM
excel-enter integer number and get two decimal places Jack H Excel Discussion (Misc queries) 2 October 16th 05 10:01 PM
Converting a number to 2 decimal places mattslav Excel Discussion (Misc queries) 2 June 4th 05 04:10 AM
How do I change the number of decimal places displayed in Excel Dan Excel Discussion (Misc queries) 1 February 23rd 05 10:31 PM


All times are GMT +1. The time now is 06:53 PM.

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

About Us

"It's about Microsoft Excel"