Hi All,
I have a hodgepodge macro I am trying to write and I need help understanding how to merge the selecting range with the formula I want applied. Essentially, I want to select a range of data and have the formula populate the corresponding fields. I know I am missing something.. I just have no idea what it is! So far I have :
I have a hodgepodge macro I am trying to write and I need help understanding how to merge the selecting range with the formula I want applied. Essentially, I want to select a range of data and have the formula populate the corresponding fields. I know I am missing something.. I just have no idea what it is! So far I have :
Code:
Sub MatchName()
Dim Rng As Range
Dim ThisRng As Range
Set ThisRng = Application.Selection
Set ThisRng = Application.InputBox("Range", ThisRng.Address, Type:=8)
Application.ScreenUpdating = False
For i = ThisRng.Rows.Count To 2 Step -1
ActiveCell.FormulaR1C1 = _
"=IFERROR(IF(MATCH(RC[-1],'[Master Database July 2018.xlsm] CONCAT LIST'!R2C1:R101C1,0),""yes"",""no""),"""")"
Range("BA2").Select
Selection.AutoFill Destination:=Range("BA2:BA305")
Range("BA2:BA305").Select
Next
Application.ScreenUpdating = True
End Sub