I am trying to change the range in a formula on sheet "Lists" using a launcher when clicking on one of the cells column A on sheet "Input", I just need to change the row of the cell in the formula. (It does not work either with the cells or range function).
When I try using the formula by itself it works perfectly, but when I use the launcher the program runs, no error message, the msgbox sends me what the formula is supposed to be, but the formula is not updated in the cell. So I guess the launcher is the problem but I cannot figure out what is the real issue, and how to make the code to work.
Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
If Not Intersect(Target, Range("A:A")) Is Nothing Then
'storing value of the clicked cell to go back on it after programmed
Application.ScreenUpdating = False
Dim myR As Variant
myR = ActiveCell.Row
Sheets("Lists").Select
Cells(3, 21).Formula2R1C1 = _
"=FILTER(R3C12:R1048576C12,ISNUMBER(SEARCH(Input!R" & myR & "C2,R3C12:R1048576C12)),""not found"")"
MsgBox ("=FILTER(R3C12:R1048576C12,ISNUMBER(SEARCH(Input!R" & myR & "C2,R3C12:R1048576C12)),""not found"")")
Range("S3").Formula2R1C1 = _
"=FILTER(R3C9:R1048576C9,ISNUMBER(SEARCH(Input!R" & myR & "C1,R3C9:R1048576C9)),""not found"")"
Call Location
Call bins
Sheets("Input").Select
Application.ScreenUpdating = True
End If
End sub