Help to derive a formula from the given example

P

pol

Execuse me for the reposting the question again .

h:mm hh:mm hh:mm
Emp sttime Endtime breake Hrs


XX 8:30 17:30 1:00
(endtim-sttime-breake)
YY 8:00 20:50 1.15
ZZ


LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row
'just start at row 3
For i = 3 To LastRow Step 1
.Cells(i, 5).NumberFormat = "[hh]:mm:ss"
.Cells(i, 5).Value = .Cells(i, 3).Value _
- .Cells(i, 2).Value _
- .Cells(i, 4).Value
Next i

No result is coming in the column Hrs from the above macros.

But when I am trying to write .Cells(i, 5).Value ="dsf" it will be coming
there after making the text format. Please help with a solution

Thanks and regards
Pol
 
P

pol

Sorry I got the answer from David paterson . The problem is there was some
column is hiding . Now it is correct. Thanks David
 

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

Top