Format Cell as Time

  • Thread starter Thread starter stuarttottle
  • Start date Start date
S

stuarttottle

Hello

i have this bit of code that i would like it to format as time when
the value is added to the cell

ActiveCell.Offset(0, 7).Value = Round(CallmediaAveHandlingHours /
NumberofWeekstoSummary, 2)

The CallmediaAveHandlingHours value is a total time taken from several
different worksheets.

Many Thanks

Stuart
 
easier then i thought

ActiveCell.Offset(0, 7).Value =
Format(Round(CallmediaAveHandlingHours / NumberofWeekstoSummary, 2),
"Long Time")

Thanks
 
One way:

With ActiveCell.Offset(0, 7)
.Value = Round(CallmediaAveHandlingHours / _
NumberofWeekstoSummary, 2)
.NumberFormat = "[hh]:mm"
End With
 

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