What is the parameter i should give for below invoke code vba
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim x As Long, LastRow As Long
With Sheets(“Sheet1”)
LastRow = .Range(“C” & .Rows.Count).End(xlUp).Row
For x = 2 To LastRow
If Selection.Count = 1 Then
If Not Intersect(Target, Range(“F” & x)) Is Nothing Then
If Target.Offset(0, -1).Value = “” Then
Call If_else_using_For
End If
End If
End If
Next x
End With
End Sub
Sub If_else_using_For()
Dim x As Long, LastRow As Long
With Sheets(“Sheet1”)
LastRow = .Range(“C” & .Rows.Count).End(xlUp).Row
For x = 2 To LastRow
If .Cells(x, 4).Value = "on Request" Then
.Cells(x, 10).Value = Cells(x, 3)
Else
.Cells(x, 10).Value = ""
End If
Next x
End With