Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2006
    Posts
    17

    Unanswered: Runtime Error '438' when inserting formula into excel

    Hi,

    I am using the following code to try to insert a formula into an excel spreadsheet and i am getting a runtime error 438 - object does not support this method or property. Can anyone help?

    Code:
    .Range("K" & RowCount).Fornula = "IF(J" & RowCount & "="","",(DATEDIF(J" & RowCount & ",TODAY(),""Y"")& ))"
    rowcount is a variable holding the numbe for the new row.

    Thanks,

  2. #2
    Join Date
    Mar 2006
    Posts
    17
    I have now fix this error. The problem was a typo in the word formula, replaced the n with an m and issing " marks.

    The working line of code is.

    Code:
    .Range("K" & RowCount).Formula = "=IF(J" & RowCount & "="""","""",(DATEDIF(J" & RowCount & ",TODAY(),""Y"")& "" ""))"

Posting Permissions

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