problem with cell reference and date

  • Thread starter Thread starter NDBC
  • Start date Start date
N

NDBC

I am trying to pick up a time (date) out of cell u5. Can someone please tell
me why this

check1 = (Sheets("a grade").Range("u5"))

works and this

check2 = (Sheets("a grade").Cells(21, 5))

doesn't. Both check1 and check2 are dim as date and the value in u5 is
0.016018519

I'm not sure if it's relevant but the value in u5 is an elapsed time
generated by now()-start time. The start time is saved in a cell using a
button based on the now() command.

I have used check2=worksheetfunction.text(Sheets("a grade").Cells(21, 5)
"[hh]:mm:ss") but this doesn't work either.

Thanks for your help. It is driving me nuts.
 
The first argument for CElls is Row...cells(row,column)

Range("u5")
is
Cells(5,21)

and not cells(21,5)
 
Back
Top