Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]() Try this. It may not be the most effecient use of system resources but it works. Unfortunately, it fires on EVERY cell that has a number greater than 8, not just the regular hours. Code: -------------------- Public oldcell As String --------------------- Private Sub Worksheet_Activate() oldcell = ActiveCell.Address End Sub --------------------- Private Sub Worksheet_Change(ByVal Target As Range) If Range(oldcell).Value 8 Then Range(oldcell).Select temphrs = ActiveCell - 8 ActiveCell.Value = 8 ActiveCell.Offset(0, 1) = ActiveCell.Offset(0, 1) + temphrs End If oldcell = ActiveCell.Address End Sub --------------------- Private Sub Worksheet_SelectionChange(ByVal Target As Range) oldcell = ActiveCell.Address End Sub -------------------- -- widemonk ------------------------------------------------------------------------ widemonk's Profile: http://www.excelforum.com/member.php...o&userid=20402 View this thread: http://www.excelforum.com/showthread...hreadid=487644 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|