+ Reply to Thread
Results 1 to 5 of 5

Insert formula in a cell through VB code.

  1. #1
    Forum Contributor ebin charles's Avatar
    Join Date
    03-31-2010
    Location
    Dammam, Saudi Arabia
    MS-Off Ver
    Microsoft Excel 2010
    Posts
    255

    Insert formula in a cell through VB code.

    Hey,

    I just need to insert formula in a cell through vb code.

    I use Leith Ross code for this macro. But I have more than 5000 rows.

    Every time this macro insert formula from the first to till last row,
    that consume more than 20 minutes.

    Is it possible to find only the last Row and insert formula.?
    Please Login or Register  to view this content.
    Your help is much appreciated.
    Charles
    Last edited by ebin charles; 06-29-2011 at 02:41 PM.

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Insert formula in a cell through VB code.

    Try

    Please Login or Register  to view this content.
    Martin

  3. #3
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Insert formula in a cell through VB code.

    Hello Charles,

    You only want to insert the formula into the last row the sheet? Use this macro.
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  4. #4
    Forum Contributor ebin charles's Avatar
    Join Date
    03-31-2010
    Location
    Dammam, Saudi Arabia
    MS-Off Ver
    Microsoft Excel 2010
    Posts
    255

    Re: Insert formula in a cell through VB code.

    Thank you very much.
    It's not working when I apply this code exactly.

    I need to insert this formula last row of J, K and M. But I couldn't.

    regards
    charles

  5. #5
    Valued Forum Contributor realniceguy5000's Avatar
    Join Date
    03-20-2008
    Location
    Fl
    MS-Off Ver
    Excel 2003 & 2010
    Posts
    951

    Re: Insert formula in a cell through VB code.

    Try this change

    Please Login or Register  to view this content.
    ...
    Thank You, Mike

    Some Helpful Hints:

    1. New members please read & follow the Forum Rules
    2. Use Code Tags...Place[code]Before the first line and[/code] After the last line.
    3. If you are pleased with a solution mark your post SOLVED.
    4. Thank those who have help you by clicking the scales at the top right of the post.

    Here...

+ 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