gtd526
Well-known Member
- Joined
- Jul 30, 2013
- Messages
- 657
- Office Version
- 2019
- Platform
- Windows
Hello,
I receive an error when trying to enter a R1C1 formula to a selected cell. Here is the formula-
ActiveCell.FormulaR1C1 = "=IFNA(INDEX('[NFL.xlsm]Weekly Picks'!R4C5:R35C5,MATCH($RC8,'[NFL.xlsm]Weekly Picks'!R4C1:R35C1,FALSE)),0)"
Here is the code:
thank you
I receive an error when trying to enter a R1C1 formula to a selected cell. Here is the formula-
ActiveCell.FormulaR1C1 = "=IFNA(INDEX('[NFL.xlsm]Weekly Picks'!R4C5:R35C5,MATCH($RC8,'[NFL.xlsm]Weekly Picks'!R4C1:R35C1,FALSE)),0)"
Here is the code:
VBA Code:
Sub Test10()
'insert formula for Parlay W/L
'use IFNA
'offset to correct cell to insert formula
LastRow = Cells(Rows.Count, "B").End(xlUp).Row 'last row according to "B"
Range("E" & LastRow).Select 'have to SELECT lastRow to select correct range regarding line below
Selection.Offset(2, 2).Select
' Range(Selection, Selection.End(xlDown)).Select 'select ALL moving Down
'insert formula
ActiveCell.FormulaR1C1 = "=IFNA(INDEX('[NFL.xlsm]Weekly Picks'!R4C5:R35C5,MATCH($RC8,'[NFL.xlsm]Weekly Picks'!R4C1:R35C1,FALSE)),0)"
End Sub
thank you