+ Reply to Thread
Results 1 to 3 of 3

insert a vba Formula to a column an comand button

  1. #1
    Registered User
    Join Date
    01-08-2012
    Location
    Lx, Portugal
    MS-Off Ver
    Excel 2003
    Posts
    2

    Unhappy insert a vba Formula to a column an comand button

    Hello

    I have a table where random records that are automatically inserted when you press the command button 1, with your help I managed to set all columns exept the last column (column O) because I don't kno what shall i do to enter the following formula: = (L7 -SOMA.SE (D7: N7, D7; K7: K7)) + SOMA.SE (D7: N7, D7, N7, N7)

    this formula should be inserted in the button code in order to automatically calculate the value of O7 after that when i press the button he must calculate O8 and so on.
    it is important to gradually increase the formula references cells +1, so it would be for the cell:
    O7 -> = (L7-SOMA.SE (D7: N7, D7; K7: K7)) + SOMA.SE (D7: N7, D7, N7, N7)

    cell O8 -> = (L8-(SOMA.SE (D7: N8, D8, K7, K8)) + SOMA.SE (D7: N8, D8, N7, N8))


    cell O9 -> = (L9-(SOMA.SE (D7: N9, D9, K7, K9)) + SOMA.SE (D7: N9, D9, N7, N9))

    10 cell -> = (L10-(SOMA.SE (D7: N10, D10, K7: K10)) + SOMA.SE (D7: N10, D10, N7, N10))

    and so on

    already have my button the following code:

    Please Login or Register  to view this content.
    Any ideas? I really need you Help.
    Last edited by Paul; 01-08-2012 at 09:30 PM. Reason: Added code tags for new user. Please do so yourself in the future.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: insert a vba Formula to a column an comand button

    Your post does not comply with Rule 8 of our Forum RULES. Cross-posting is when you post the same question in other forums on the web. You'll find people are disinclined to respond to cross-posts because they may be wasting their time solving a problem that has been solved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser)to the cross-post. Expect cross-posts without a link to be closed a message will be posted by the moderator explaining why. We are here to help so help us help you!

    Read this to understand why we ask you to do this
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    01-08-2012
    Location
    Lx, Portugal
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: insert a vba Formula to a column an comand button

    Ok, thank's but i have turned to your forum because in fact nobody could still no solution to this problem, then it is logical if I go to a technician and he did not find any solution i can try to go to other sites.
    But okay, if I made a fault in relation to the rules of the forum I'm sorry.
    I see that my question has no solution because if not even the experts can solve that so I, a lot less.
    What made me seek help elsewhere is the desperation for it to work there in the hospital, nothing more.
    Thanks anyway.

    the link:http://www.mrexcel.com/forum/showthread.php?t=603750

    Regards
    Last edited by _Fly_; 01-09-2012 at 06:28 AM.

+ 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