How to include dynamic VLOOKUP in FormulaR1C1 VBA?
I need to lookup values on another sheet. My formula works great, when i use it manually =VLOOKUP(TRIM(C2),TRIM(‘MyDataSheet’!$A$1:$E$500),4,FALSE) However, I need to be able to plug this formula into a cell dynamically using VBA. This is what I tried: Set lookupRange = ThisWorkbook.Sheets("MyDataSheet").Range("A1:E500") Set newCol = tbl.ListColumns.Add newCol.DataBodyRange.FormulaR1C1 = "=VLOOKUP(TRIM(RC[-16])," & lookupRange.Address(True, True, xlR1C1) &… Read More How to include dynamic VLOOKUP in FormulaR1C1 VBA?