+ Reply to Thread
Results 1 to 5 of 5

add simple formula to cell in vba

Hybrid View

  1. #1
    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

    Range("your_range") = "=B4*B3"
    If you want your range to be the result of B4 * B3 then

    Range("Your_range") = Range("A4") * Range("B3")
    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.

  2. #2
    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:
    Sub insertformula()
    Range("b4") = Range("b4") * Range("B3")
    End Sub

+ 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