From memory - when you want a quote " inside of other quotes " " you use
""" (3 quotes)
so Worksheets(1).Cells(23, 8).Formula _
= "=if(itemnmlnk1 "StockOut", "", 2)"
should become
Worksheets(1).Cells(23, 8).Formula _
= "=if(itemnmlnk1 """StockOut""", """, 2)"
---
Message posted from
http://www.ExcelForum.com/