I need to enter the formula in the last empty cell and copy down. However, I now realize that the E2 & M2 in my formula, which represents weight and a integer - may be in different columns! Can I find them based on the column header?? It will be the only thing certain to be the same. HELP!??
Application.ScreenUpdating = False
Dim NextCol As Long, LastRow As Long
NextCol = .Cells(1, Columns.Count).End(xlToLeft).Column + 1
LastRow = .Cells(Rows.Count, "A").End(xlUp).Row
.Cells(1, NextCol) = "Ground Rates"
.Range(.Cells(2, NextCol), .Cells(LastRow, NextCol)).Formula = "=IF($E2>=150,(VLOOKUP($E2,GR,$M2,TRUE)/150)*$E2,VLOOKUP($E2,GR,$M2,FALSE))"
Application.ScreenUpdating = True