Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Macro Code required
Hi,
I have a macro to calculate the time ... Col A - Start time Col B - End Time click Button created -e.g., if user click that buttton it gives the system time as 00:06:53 in A1 (hh:mm:ss) and again if user click that button it will gives the system 00:06:55 in B1.... if user click that button again it moves to A2 and gives the times... similarly it moves down as and when user clicks.. The problem is user chooses different cells, so this lead wrong time calculation so i need to specify the range as (B10:C100). so that the time will calculate in right manner. Thanks a lot |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Macro Code required
Muddan,
Dim Coll As Integer Dim Roww As Integer Sub TimeReset() Coll = 1 Roww = 1 End Sub Sub TimeInsert() If Roww = 0 Or Coll = 0 Then TimeReset Cells(Coll, Roww) = Time() If Roww = 1 Then Roww = Roww + 1 Else Roww = 1 Coll = Coll + 1 End If End Sub -- Regards from Virginia Beach, Earl Kiosterud www.smokeylake.com ----------------------------------------------------------------------- "muddan madhu" wrote in message ... Hi, I have a macro to calculate the time ... Col A - Start time Col B - End Time click Button created -e.g., if user click that buttton it gives the system time as 00:06:53 in A1 (hh:mm:ss) and again if user click that button it will gives the system 00:06:55 in B1.... if user click that button again it moves to A2 and gives the times... similarly it moves down as and when user clicks.. The problem is user chooses different cells, so this lead wrong time calculation so i need to specify the range as (B10:C100). so that the time will calculate in right manner. Thanks a lot |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
help required in completing the code | Excel Discussion (Misc queries) | |||
Code required for VLookup returning #NA | Excel Discussion (Misc queries) | |||
Macro required | Excel Worksheet Functions | |||
Macro Help required | Excel Discussion (Misc queries) | |||
vba macro required ? | Links and Linking in Excel |