Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
does anyoone know if there is a function that count the number of digit in a
number? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Maybe:
=len(a1) SHIRA wrote: does anyoone know if there is a function that count the number of digit in a number? -- Dave Peterson |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
this was simple :)
"Dave Peterson" wrote: Maybe: =len(a1) SHIRA wrote: does anyoone know if there is a function that count the number of digit in a number? -- Dave Peterson |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You will have to be careful with that:
Sub test() Dim d As Double d = 100 MsgBox Len(d) End Sub May have to do: MsgBox Len(CStr(d)) RBS "Dave Peterson" wrote in message ... Maybe: =len(a1) SHIRA wrote: does anyoone know if there is a function that count the number of digit in a number? -- Dave Peterson |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You can use this formula. It counts the number of digits for the number in
cell A1. Note that it counts the number of digits entered, not the number of digits displayed. for instance if the number is formatted to show 2 decimals and the number 5 is enetered, the cell will show 5.00, but since only 1 digit was entered the formula will return 1... =IF(ISERROR(FIND(".",A1)), LEN(ABS(A1)), LEN(ABS(A1))-1) also I assume you don't count the decimal as a digit, nor the negative sign. -- HTH... Jim Thomlinson "SHIRA" wrote: does anyoone know if there is a function that count the number of digit in a number? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to validate a cell to insert from 9 digit number to 13 digit number. | Excel Worksheet Functions | |||
How to validate a cell to insert from 9 digit number to 13 digit number. | Excel Worksheet Functions | |||
Color a single digit in a mult-digit number cell | Excel Discussion (Misc queries) | |||
How do I identify the 7th digit in a 13 digit number, then establi | Excel Worksheet Functions | |||
When we enter a 16 digit number (credit card) the last digit chan. | Excel Discussion (Misc queries) |