I have written a macro that copies a row to a new sheet and adds a formula to that copied row.
Worksheets("Closed").Range("M" & LastRowNewOrd + 1).Formula = "=IF(K" & LastRowNewOrd + 1 & "+270=270,,K" & LastRowNewOrd + 1 & "+270)"
Worksheets("Suivi").Range("M" & LastRowNewOrd + 1).NumberFormat = "dd.mmmm.yyyy,,"
Which correclty puts the formula =IF(K5+270=270,,K5+270)
The problem is that the cell shows #NAME?
If I hit F2 and Enter - the cell shows 40355
If I had written the formula manually I would get 26 June 2010 which is what I want.
How do I get the cell to run the formula and display in date format I want?
Thanks for you help in advance.
Bookmarks