Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel,microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
How many decimal places can be displayed in a cell? I'm running a brute
force VBA procedure of finding fractions that will approximate pi to as many decimal places as Excel will display, but I don't know how many decimal places Excel will display accurately. Anybody know? I guess this is also a matter of how many decimal places VBA will calculate accurately as well. Sub PiFractions() Dim dividend As Integer, divisor As Integer, quotient As Double Dim rowpointer As Byte rowpointer = 1 For dividend = 22 To 10000 For divisor = 7 To dividend \ 3 quotient = dividend / divisor If quotient 3.14159 And quotient < 3.1416 Then Cells(rowpointer, 1) = dividend Cells(rowpointer, 2) = divisor Cells(rowpointer, 3) = quotient rowpointer = rowpointer + 1 End If Next Next End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Setting the number of decimal places for a text box. | Excel Discussion (Misc queries) | |||
Urgent date/scheduling calc needed | Excel Worksheet Functions | |||
large text amount in cell will not display in the cell | Excel Discussion (Misc queries) | |||
Need Workaround for Cell Display Limitation in Excel 2000 | Excel Discussion (Misc queries) | |||
Changing display of decimal value based on the value in the cell | Excel Worksheet Functions |