+ Reply to Thread
Results 1 to 3 of 3

Problem Writing a Formula to a Cell using VBA

  1. #1
    Valued Forum Contributor StevenM's Avatar
    Join Date
    03-23-2008
    Location
    New Lenox, IL USA
    MS-Off Ver
    2007
    Posts
    910

    Problem Writing a Formula to a Cell using VBA

    See: 3smees23_v4.xlsm

    Run: AddFloor

    Where the rows are now red you should find the following:

    At D29 & D44 you should see the formula =D14
    And at C44 you should see the formula =C14

    But ....

    At B29 & B44 you should/will see "=B14" as text and not as a formula.
    At C29 you should/will see "=C14" as text and not as a formula.

    Open the VB editor and scroll down to:

    Please Login or Register  to view this content.
    This is the code I'm using to attempt to write formulas to these cells.

    So the mystery is this, why did the above code correctly create formulas at D29, D44 & C44; but didn't at B29, B44, & C29?

    I'm baffled and at wits end, what am I missing?

  2. #2
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Problem Writing a Formula to a Cell using VBA

    the cells are formatted as Text. change that to something else before adding the formula. for example
    Please Login or Register  to view this content.
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  3. #3
    Valued Forum Contributor StevenM's Avatar
    Join Date
    03-23-2008
    Location
    New Lenox, IL USA
    MS-Off Ver
    2007
    Posts
    910

    Re: Problem Writing a Formula to a Cell using VBA

    That worked!! Thanks! You're a Genius!!!!

+ Reply to Thread

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