+ Reply to Thread
Results 1 to 5 of 5

add simple formula to cell in vba

  1. #1
    Registered User
    Join Date
    03-07-2012
    Location
    usa
    MS-Off Ver
    Excel 2010
    Posts
    12

    add simple formula to cell in vba

    just trying to insert code to a cell in vba and not in cell on spreadsheet as i would like to change the value and have it automatically calculated. formula i would like is =b4*b3, my code is not working

    Please Login or Register  to view this content.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: add simple formula to cell in vba

    Hi,

    I'm not quite clear what you're asking. If all you want to do is have vba enter a formula for you then

    Please Login or Register  to view this content.
    If you want your range to be the result of B4 * B3 then

    Please Login or Register  to view this content.
    Regards
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    03-07-2012
    Location
    usa
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: add simple formula to cell in vba

    new code still not working
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    03-07-2012
    Location
    usa
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: add simple formula to cell in vba

    found error in code but still does not work
    actual code:
    Please Login or Register  to view this content.

  5. #5
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: add simple formula to cell in vba

    Please upload a workbook or a representative cut down copy, anonymised if necessary. It is always easier to advise if we can see your request in its context.

    Show a before and after situation and if it's not blindingly obvious how you have arrived at your results some explanatory notes as well.

+ 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