Hi Beth,
As requested.
I have had to make some assumptions regarding the VLOOKUP, the lookup value
cell, the lookup range, the column offset, and where it requires an exact
match. Either adjust or post back with details
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Application.EnableEvents = False
On Error GoTo sub_exit
With Target
If .Column = 11 Then 'column J
'test if A and C are blank
If .Offset(0, -10).Value = "" And .Offset(0, -7).Value = "" Then
If .Value = "a" Then
.Value = ""
Else
.Value = "a"
.Font.Name = "Marlett"
End If
Else
.FormulaR1C1 = "=VLOOKUP(RC[-10],myTable,2,False)"
End If
End If
End With
sub_exit:
Application.EnableEvents = True
End Sub
--
HTH
Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
Bob,
Thank you very much. The user is impressed, and now wants
more! Can I add a condition to one of the IF statements?
The user is now asking for the tick mark functionality to
be available in all of column K, but only where the values
in A and C are blank. Otherwise, they want a vlookup to
pull a value in from elsewhere.
I can handle the if statement, and I can handle the
Vlookup. But I don't know how to put them in the code you
so generously supplied. Is it possible?