Hey
Wondering if anyone can tellme why this isnt working? I'm trying to update cell"BT14" within a worksheet called"Master Costing"with a lookup formula. The code appears to run but when I open the file, there is nothing in the cell. V annoying:
:banghead: Any brilliant person out there able to tell me why is isn't working?
Much appreciated!
Wondering if anyone can tellme why this isnt working? I'm trying to update cell"BT14" within a worksheet called"Master Costing"with a lookup formula. The code appears to run but when I open the file, there is nothing in the cell. V annoying:
Code:
Sub FormulaCorrection()
Dim LastColumn As Integer
Dim LastRow As Long
Dim LastCell As Range
Dim ws As Worksheet
Dim wsUpload As Worksheet
Dim wsComment As Worksheet
Dim wsTemp As Worksheet
Dim wb As Workbook
Dim wbTemp As Workbook
Dim fRange As Range
Set ws = Sheets("Master Costing")
Set wb = ActiveWorkbook
Application.ScreenUpdating = False
ws.Select
'Insert Lookup
ws.Range("BT14").Formula = "=vlookup(L14,IF(ISNA(VLOOKUP(L14,'K:\Finance\ManAccts\Business Planning\2013-14\01 Planning Models\03 Pay Modelling\Templates\[Incremental Drift Workings.xlsx]Organisation Detail'!$AF:$AG,2,FALSE)),0,VLOOKUP(L14,'K:\Finance\ManAccts\Business Planning\2013-14\01 Planning Models\03 Pay Modelling\Templates\[Incremental Drift Workings.xlsx]Organisation Detail'!$AF:$AG,2,FALSE))"
wbTemp.Close False
Application.ScreenUpdating = True
End Sub
:banghead: Any brilliant person out there able to tell me why is isn't working?
Much appreciated!