Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Decimal Dilemma
Im looping through a column of numbers. Each number is stored in a
variable, Y_CellTest, as that row is dealt with and a comparative test is performed. The value of Y_CellTest can go out a varying number of positions to the right of the decimal point. How do I alter that variable Y_CellTest, to read only X numbers of places to the right of the decimal point? Currently the line reads Y_CellTest = Worksheets(2).Cells(Loop_rO, coLArray(X_col)). Y_CellTest = 43.3762286964325 but I want it to read only say 4 places to the right of the decimal point, Y_CellTest = 43.3762. Appreciatively, Arturo |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Decimal Dilemma
Got it:
Y_CellTest = Round(Worksheets(2).Cells(Loop_rO, coLArray(X_col)), 4) "Arturo" wrote: Im looping through a column of numbers. Each number is stored in a variable, Y_CellTest, as that row is dealt with and a comparative test is performed. The value of Y_CellTest can go out a varying number of positions to the right of the decimal point. How do I alter that variable Y_CellTest, to read only X numbers of places to the right of the decimal point? Currently the line reads Y_CellTest = Worksheets(2).Cells(Loop_rO, coLArray(X_col)). Y_CellTest = 43.3762286964325 but I want it to read only say 4 places to the right of the decimal point, Y_CellTest = 43.3762. Appreciatively, Arturo |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
What if Dilemma | Excel Discussion (Misc queries) | |||
BIG Dilemma.....HELP!! | Excel Worksheet Functions | |||
If Then Dilemma | Excel Worksheet Functions | |||
Spreadsheet Dilemma | Excel Discussion (Misc queries) | |||
XL add-in dilemma | Excel Programming |