Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have the following
sqmrc1 = Range("K1").Value / 1000 Which is used later Cells(ActiveCell.Row, ActiveCell.column + 1).Value = sqmrc1 I have found how to divide sqmrc1 but how do I make the result to zero decimal places? Thanks Blue |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Two possible answers depending on how much accuray you want to maintain.
format(sqmrci, "0") or round(sqrmc1, 0) Hope this helps... "Blue" wrote: I have the following sqmrc1 = Range("K1").Value / 1000 Which is used later Cells(ActiveCell.Row, ActiveCell.column + 1).Value = sqmrc1 I have found how to divide sqmrc1 but how do I make the result to zero decimal places? Thanks Blue |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Jim thanks for the reply
I have tried various ways of using Format(sqmrc1, "0") but get an error message or result is zero. How/where do I attached Format(sqmrc1, "0") to sqmrc1 = Range("K1").Value / 2 Thanks Blue |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Cells(ActiveCell.Row, ActiveCell.column + 1).Value = Format(sqmrc1,"0")
or ActiveCell.Offset(0,1).Value = Format(sqmrc1,"0") or ActiveCell(1,2).Value = Format(sqmrc1,"0") "Blue" wrote in message k... Jim thanks for the reply I have tried various ways of using Format(sqmrc1, "0") but get an error message or result is zero. How/where do I attached Format(sqmrc1, "0") to sqmrc1 = Range("K1").Value / 2 Thanks Blue |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
John,
Cells(ActiveCell.Row, ActiveCell.column + 1).Value = Format(sqmrc1,"0") Did the trick, Thanks Blue |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Decimal Places | Excel Discussion (Misc queries) | |||
Decimal Places | Excel Discussion (Misc queries) | |||
Subtracting two 2-decimal place numbers gives result 13-decimal places? | Excel Worksheet Functions | |||
Max decimal places | Excel Discussion (Misc queries) | |||
FIXED 2 DECIMAL PLACES, MUST ENTER ALL ZEROES AFTER DECIMAL POINT. | Excel Discussion (Misc queries) |