i use this code behind a VB.net button in a loop to look-up pricing from another workbook and it populates some cells and not other cells in column H with 0 if no look-up is found.
Why is it skipping some cells?
column H
Code:Dim lLabourCostFormulaToEnter As String = Nothing lLabourCostFormulaToEnter = "=IF(ISNA(VLOOKUP($B:$B,'" & dDircetory & "[PricingSheet.xls]Pricing'!$A$1:$D$5000,2,FALSE)),0,VLOOKUP($B:$B,'" _ & dDircetory & "[PricingSheet.xls]Pricing'!$A$1:$D$5000,2,FALSE))" moSheet1.Cells(row, col).Formula = lLabourCostFormulaToEnter col = col + 1
thx
toe
edit
i thought this was a VB question
the button i speak of is a .net button....



Reply With Quote