Check Box/Tick Box
I acquired this from one of BP's post. Help is required to fine tune the
codes. Thanks. Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) Const WS_RANGE As String = "E02:E22" If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then With Target If .Value < "X" Then ..Font.Name = "Arial" ..Value = "X" Range("B7").Select ActiveCell.FormulaR1C1 = _ "=IF(ISERROR(VLOOKUP(""X"",R[-2]C[3]:R[15]C[12],10,FALSE)),"""",VLOOKUP(""X"",R[-2]C[3]:R[15]C[12],10,FALSE))" Range("B7").Select Selection.Copy Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=False Application.CutCopyMode = False Range("B3").Select '.Offset(2, -3).FomulaFormat = "" Else ..Value = "" '.Offset(0, 1).Value = "" Range("B7").Select Selection.ClearContents Range("B3").Select End If End With End If End Sub |
All times are GMT +1. The time now is 11:27 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com