Hey
is this possibel in VBA code
if i have a Empty cell ("F16") then Value from ("F15") is Divide with "2" But if value in ("F15") is Odd then Add +1 to value in ("F15") and then Divide with 2 and then Value is Put into Cell("F16") is that Possibel
i have look and search around Google but didn Find any solution about it
the same function should work in Colomn "F" to "R" on Row "16"
And if cell Empty ("F19") then Value from ("F18") is Divide with "2" But if value in ("F19") is Odd then Add +1 to value in ("F18") and then Divide with 2 and then Value is Put into Cell("F19")
this is the code i have in My workbook for other cell's
is this possibel in VBA code
if i have a Empty cell ("F16") then Value from ("F15") is Divide with "2" But if value in ("F15") is Odd then Add +1 to value in ("F15") and then Divide with 2 and then Value is Put into Cell("F16") is that Possibel
i have look and search around Google but didn Find any solution about it
the same function should work in Colomn "F" to "R" on Row "16"
And if cell Empty ("F19") then Value from ("F18") is Divide with "2" But if value in ("F19") is Odd then Add +1 to value in ("F18") and then Divide with 2 and then Value is Put into Cell("F19")
this is the code i have in My workbook for other cell's
Code:
[/COLOR]Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Target.Value = "" Then
Range("F15").Value = Target.Value / 2
ElseIf Target.Value = "41" Then
Range("16").Value = "41"
On Error Resume Next
If Not Intersect(Target, Range("F10:R19")) Is Nothing Then
If Target.Value Mod 2 = 1 Then Target.Value = Target.Value + 1
'Target.Value = Target.Value + 1
'Range("F10").Value = Range("F10").Value + 1
Target.Value = Target.Value / 2
Cancel = True
End If
End If
End Sub
[COLOR=#333333]
Last edited: