View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
OzonedMan OzonedMan is offline
external usenet poster
 
Posts: 2
Default Need help with rounding in VBA code

When I try to break a value into 3 equal parts

ActiveCell.Offset(-1, 0).Range("A1").Select
ActiveCell.FormulaR1C1 = "=R[1]C/3"
ActiveCell.Offset(-1, 0).Range("A1").Select
ActiveCell.FormulaR1C1 = "=(R[2]C-R[1]C)/2"
ActiveCell.Offset(-1, 0).Range("A1").Select
ActiveCell.FormulaR1C1 = "=R[3]C-(R[2]C+R[1]C)"

it works fine, but how can I Round each new amount to 2 decimals for
currency?
I have some with 8 or 10 #'s after the decimal, not what I want.
kind of like
ActiveCell.FormulaR1C1 = Round("=R[1]C/3",2)
but I know that won't work.