Results 1 to 9 of 9

VBA .Formula not calculating

Threaded View

GDS VBA .Formula not calculating 05-25-2009, 12:28 PM
Leith Ross Re: VBA .Formula not... 05-25-2009, 01:08 PM
shg Re: VBA .Formula not... 05-25-2009, 01:22 PM
GDS Re: VBA .Formula not... 05-25-2009, 01:52 PM
Leith Ross Re: VBA .Formula not... 05-25-2009, 01:58 PM
GDS Re: VBA .Formula not... 05-25-2009, 01:59 PM
shg Re: VBA .Formula not... 05-25-2009, 02:16 PM
GDS Re: VBA .Formula not... 05-25-2009, 02:44 PM
shg Re: VBA .Formula not... 05-25-2009, 04:10 PM
  1. #1
    Registered User
    Join Date
    04-30-2009
    Location
    Canada
    MS-Off Ver
    Excel 2003
    Posts
    24

    VBA .Formula not calculating

    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.
    Last edited by GDS; 05-25-2009 at 02:45 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1