i trying create table tracks downtime production machine. operator using table columns down time start , down time stop. each time happens have leave station want them have click empty cell under downtime stat title , time appear/ log in cell same downtime stop.
i have following code works point if click anywhere in columns g , h current time show up:
private sub worksheet_selectionchange(byval target range) 'check see if click/selected cell in columns or b if not intersect(target, range("g:h")) nothing 'make sure 1 cell selected: if target.cells.count = 1 'update value target.value = now() end if end if end sub
how make time show if click in range of rows? right if click on column title changed current time, dont want.
thank help
how this?
private sub worksheet_selectionchange(byval target range) 'check see if click/selected cell in columns or b if not intersect(target, range("g:h")) nothing 'make sure 1 cell selected: if target.cells.count = 1 , target.row > 1 , target.row <= somenumber 'update value target.value = now() end if end if end sub