Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
dadad wrote:
i want a cell to automatically increase its value by 1 each time another (predetermined) cell shows a value of zero, is this possible ?, if so, how would i go about it ?. 'each time' needs narrowing -- 'each recalculation' or 'each time any data is entered' or 'each time a1 goes from non-zero to zero' or .. This assumes B1 gets incremented when 0 is entered into A1: Private Sub Worksheet_Change(ByVal Target As Excel.Range) If Not (Intersect(Range("a1"), Target) Is Nothing) Then If IsNumeric(Range("a1")) Then If Cells(1, 1) = 0 Then Cells(1, 2) = Cells(1, 2) + 1 End If End If End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how to format a cell adding 17.5% VAT excel | Excel Discussion (Misc queries) | |||
Can I split a excel cell w/out adding a column? | Excel Discussion (Misc queries) | |||
Adding footnote to cell in Excel | Excel Discussion (Misc queries) | |||
formula for adding every other cell in Excel | Excel Worksheet Functions | |||
adding a command button to an excel cell? | Excel Discussion (Misc queries) |