Hi Guys, I have a massive template that has a large number of formulas in the spreadsheet so I wanted to reduce the size by building the formulas in a macro and have the macro enter the result in a hard coded value.
I'm not great with macros but I did a few searches and have the following -
Can someone please help me update the macro so it does the following -
Thanks heaps!
I'm not great with macros but I did a few searches and have the following -
Code:
Sub Template_CheckFlags()
Dim LastRow As Long
LastRow = Range("T_Salary_ID").Cells(1, 1).Row + Range("T_Salary_ID").Rows.Count - 1
For i = 8 To LastRow
If IsEmpty(Range(i, "T_Previous_Position_Title")) = False Then
ActiveSheet.Range("T_Previous_Position_Title").Formula = "=VLookup(T_Salary_ID.Value, DB_Cur, 13, False)"
End If
Next i
End Sub
Can someone please help me update the macro so it does the following -
- Find the last row in "T_Salary_ID" (named range)
- then enter the formula in "T_Previous_Position_Title" which is the title of my named range
- Have the result of Vlookup entered as a hard coded value
Thanks heaps!