View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
NDBC NDBC is offline
external usenet poster
 
Posts: 204
Default cell selection code

Mike

Thanks for that. In the interim I had thought that maybe my dim statements
for the lastlap and lapcol were wrong. I deleted the dim statement altogether
for those 2 and then it seemed to work. How should they be set.


"Mike H" wrote:

As long as your sure your row/column coordinates are correct then try this

LastLap = Format(Sheets("A Grade").Cells(ridercell.Row, lapcol).Value,
"hh:mm.ss")

Mike

"NDBC" wrote:

I am trying to get the time (lastlap) from Worksheet (A Grade) when i know it
is located in the nth column (lapcol) and the nth row ridercell.row. I have
checked that the row and column co-ordinates are right but I don't think this
code works. It is returning 0 when it should have been the time 0:00:10. Is
it something to do with the number being in a time format.

LastLap = Sheets("A Grade").Cells(riderCell.Row, LapCol).Value

Thanks again