gtd526
Well-known Member
- Joined
- Jul 30, 2013
- Messages
- 684
- Office Version
- 2019
- Platform
- Windows
Hello,
I'm inserting the following formula via VBA. Once inserted, I fill the cells down with the same formula.
I use the [-1] to go back 1 row. The formula works perfectly, but I need to change it from Relative Row to Absolute Row, as stated below. Otherwise I have to change it manually, then fill down.
Once inserted the formula becomes:
IFERROR(LOOKUP(2, 1/((COUNTIF($H8:$H8, Favs!$I$4:$I$33)=0)*(Favs!$I$4:$I$33<>"")), Favs!$I$4:$I$33),"")
I want to change the $H8:$H8 to $H$8:$H8 when the formula is inserted.
What adjustments are needed to make the Row Absolute? Its only the 1st Row listed not both.
Thank you.
I'm inserting the following formula via VBA. Once inserted, I fill the cells down with the same formula.
VBA Code:
Range("I9").Select
ActiveCell.FormulaR1C1 = _
"=IFERROR(LOOKUP(2, 1/((COUNTIF(R[-1]C8:R[-1]C8, '[NBA.xlsm]Favs'!R4C9:R33C9)=0)*('[NBA.xlsm]Favs'!R4C9:R33C9<>"""")), '[NBA.xlsm]Favs'!R4C9:R33C9),"""")"
I use the [-1] to go back 1 row. The formula works perfectly, but I need to change it from Relative Row to Absolute Row, as stated below. Otherwise I have to change it manually, then fill down.
Once inserted the formula becomes:
IFERROR(LOOKUP(2, 1/((COUNTIF($H8:$H8, Favs!$I$4:$I$33)=0)*(Favs!$I$4:$I$33<>"")), Favs!$I$4:$I$33),"")
I want to change the $H8:$H8 to $H$8:$H8 when the formula is inserted.
What adjustments are needed to make the Row Absolute? Its only the 1st Row listed not both.
Thank you.