Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm trying to make a worksheet that counts time. I've done the period time to
the left and the days on top. I want Excel to count 20minutes every time someone fills in a text in the cells below the days. If he/she for example fills in math it should count 20 minutes in another cell where the total time will be found. If nothing is filled in the cell it shall remain empty. Counting the time is no problem the problem beginns when I want excel to react when someone writes in a cell. I've got excel 97. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() you will need a formula something like this =IF(A1="","","0:20") or you will need a worksheet event macro like this Private Sub Worksheet_Change(ByVal Target As Range) Application.EnableEvents = False If Target.Column = 1 Then If Target.Value < "" Then Cells(Target.Row, 2) = "0:20" End If End If Application.EnableEvents = True End Sub -- mudraker ------------------------------------------------------------------------ mudraker's Profile: http://www.excelforum.com/member.php...fo&userid=2473 View this thread: http://www.excelforum.com/showthread...hreadid=538380 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you!
Trouble is when I create a worksheet event macro like you suggest it wont run. It says "You used End Function or End Property to end a Sub procedure. Use End Sub for this type of procedure." I don't get it?! I've used End sub as I should, so what's wrong here? Kajo "mudraker" skrev: you will need a formula something like this =IF(A1="","","0:20") or you will need a worksheet event macro like this Private Sub Worksheet_Change(ByVal Target As Range) Application.EnableEvents = False If Target.Column = 1 Then If Target.Value < "" Then Cells(Target.Row, 2) = "0:20" End If End If Application.EnableEvents = True End Sub -- mudraker ------------------------------------------------------------------------ mudraker's Profile: http://www.excelforum.com/member.php...fo&userid=2473 View this thread: http://www.excelforum.com/showthread...hreadid=538380 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Time calculations for Scheduled Time vs. Actual Time Worked | Excel Discussion (Misc queries) | |||
straight time, time and a half, and double time | Excel Discussion (Misc queries) | |||
Calculate Ending time using Start Time and Elapsed Time | Excel Worksheet Functions | |||
Formula to find Stop Time from Start Time and Total Minutes | Excel Worksheet Functions | |||
Calculating days & time left from start date/time to end date/time | Excel Worksheet Functions |