View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Geoff Geoff is offline
external usenet poster
 
Posts: 371
Default Changing time format to numeric

Thanks for all the responses but they unfortunately still don't resolve my
problem. While this works fine when modifying Excel manually on the
worksheet, I need to be able to do it with the use of code which so far I
have been unable to do.

The code I tried was
xlApp.Application.Range(A8:H38) = xlApp.Application.Range(Cells(8, 8),
Cells(36, 8)).Value *24

Also the range to be changed is not actually A8:H36 - it is A8 to end of
file as all the worksheets are of different length with differing amounts of
rows. Any ideas on what I'm doing wrong guys?

"Andrew Taylor" wrote:

Multiply by 24 and format as General.

Geoff wrote:
How do I programatically change a derived time format displayed as 8:00:00
(hours - derived from a formula finish time minus start time) to the numeric
format 8 in a cell - can it be done?