irfananeeza
Active Member
- Joined
- Feb 15, 2008
- Messages
- 334
- Office Version
- 2010
Dear Excel Experts, how can I make cell F2 dynamic? I have tried tweaking it as Match (range("F" & x), $B$2:$B$6,0),1)", OR Match( cells( x, 6), $B$2:$B$6,0),1)" but none worked. IS there a way to tweak the same very formula code to make it work.
Sub match_Index_Formula()
For x = 2 To Cells(Rows.Count, 6).End(xlUp).Row
Range("G" & x) = "=INDEX($C$2:$C$6, MATCH( F2, $B$2:$B$6,0),1)"
Next x
End Sub
Sub match_Index_Formula()
For x = 2 To Cells(Rows.Count, 6).End(xlUp).Row
Range("G" & x) = "=INDEX($C$2:$C$6, MATCH( F2, $B$2:$B$6,0),1)"
Next x
End Sub