View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Steve C Steve C is offline
external usenet poster
 
Posts: 119
Default Round to nearest whole number

The second option does the trick. Thanks, Tom!
--
Steve C


"Tom Ogilvy" wrote:


NamesPerSlip = Round(ActiveCell.Offset(0, -3) / ActiveCell.Offset(0, -2),0)

if you like the way the worksheet rounds

NamesPerSlip = Application.Round(ActiveCell.Offset(0, -3) /
ActiveCell.Offset(0, -2),0)


--
Regards,
Tom Ogilvy


"Steve C" wrote:

Upon dividing one cell by another, I want to store the result in a variable
that is rounded to the nearest whole number (6.5 = 7, 6.2 = 6, etc.).

My basic formula is:
NamesPerSlip = ActiveCell.Offset(0, -3) / ActiveCell.Offset(0, -2)

Rounding NamesPerSlip up or down as needed is my challenge. Thanks as always!

--
Steve C