+ Reply to Thread
Results 1 to 10 of 10

Add formula thru VBA

  1. #1
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Add formula thru VBA

    Hello:

    I am using below VBA code successfully.

    Please Login or Register  to view this content.
    I want to add the formula in the next row : =IF($Ax=$K$40,$L$19,0)
    where x in $Ax would be 1 + the value in cell B112
    Example if Cell value in B112 = 50, then the formula would be =IF($A51=$K$40,$L$19,0)

    I hope this is clear and let me know if you have any questions.

    Thanks

    Riz
    Last edited by arlu1201; 03-12-2013 at 01:20 PM. Reason: Code tags should be put for the 1st post.

  2. #2
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Add formula thru VBA

    Maybe:

    Please Login or Register  to view this content.

  3. #3
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: Add formula thru VBA

    Hi John:

    Yes this works..
    Thank so so much..

    Riz

  4. #4
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Add formula thru VBA

    You're welcome. Glad to hear that and thanks for the feedback.

  5. #5
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167

    Re: Add formula thru VBA

    rizmomin,

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code in [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  6. #6
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: Add formula thru VBA

    Hello arlu201:

    Sorry, i got it..this wont happen again.
    Now i know how to tag the code.

    Riz

  7. #7
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: Add formula thru VBA

    Hi John:

    Can you help me add 1 more formula.

    Want to add

    Please Login or Register  to view this content.
    where x = 1 + value in cell B112

    Thanks

    Riz

  8. #8
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Add formula thru VBA

    Maybe:

    Please Login or Register  to view this content.

  9. #9
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: Add formula thru VBA

    Hi John:

    Thanks a lot for your help...it works.

    Riz

  10. #10
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Add formula thru VBA

    Glad to hear and thanks for the feedback.

+ 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