Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
must be getting tired. Just tried cells(5, 21) and it worked a lot better.
"NDBC" wrote: 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. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The first argument for CElls is Row...cells(row,column)
Range("u5") is Cells(5,21) and not cells(21,5) -- If this post helps click Yes --------------- Jacob Skaria "NDBC" wrote: 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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Problem w/ cell reference | Excel Discussion (Misc queries) | |||
dim problem when using cell() reference | Excel Programming | |||
Cell reference problem | Excel Worksheet Functions | |||
problem with cell reference in =sum(offset(cell reference,x,y,z,a)). Want cell ref to be variable. | Excel Worksheet Functions | |||
Problem with =sum(offset(cell reference,w,x,y,z). I want cell reference to be variable | Excel Worksheet Functions |