Zero Decimal Places

  • Thread starter Thread starter Blue
  • Start date Start date
B

Blue

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
 
Two possible answers depending on how much accuray you want to maintain.

format(sqmrci, "0")

or

round(sqrmc1, 0)

Hope this helps...
 
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
 
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")
 
John,

Cells(ActiveCell.Row, ActiveCell.column + 1).Value = Format(sqmrc1,"0")

Did the trick, Thanks

Blue
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top