+ Reply to Thread
Results 1 to 16 of 16

VBA Script - Cell value added into other cell

  1. #1
    Registered User
    Join Date
    12-07-2015
    Location
    Chesterfield
    MS-Off Ver
    2013
    Posts
    24

    VBA Script - Cell value added into other cell

    Hi, am needing some help with e VB code.

    I have a spreadsheet and I am wanting to have a cell add its value into another cell to increase the value in said cell.

    If the number ‘2’ is input into D6 and down to D200 etc… I want this to add to the value of E6 and the cell next to the D Cell. So E6 would change from ‘10’ to ‘12’ for example.

    This will also pop up with a custom message saying ‘yes’ or ‘no’ and then the value in D6 would be removed automatically.

    I am also wanting to the same for G6 having its value added into F6 increasing the value again.

    Attached in my test spreadsheet image and below is the VB script I have at the moment but it is only deducting the value away and I can’t get it to do addition. Also is there anything else I should change in the code to make it work for all cells?

    Please Login or Register  to view this content.
    Thanks for the help.

    Screen Shot 2016-11-10 at 10.28.01.png

  2. #2
    Forum Contributor IonutC's Avatar
    Join Date
    01-28-2016
    Location
    Bucharest, Romania
    MS-Off Ver
    Office 2019
    Posts
    486

    Re: VBA Script - Cell value added into other cell

    Harvey,

    I can help, but pls attach your spreadsheet.
    Please consider:
    Be polite. Thank those who have helped you.
    Click the star icon in the lower left part of the contributor's post and add Reputation. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .
    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    Posting code between tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

  3. #3
    Forum Contributor IonutC's Avatar
    Join Date
    01-28-2016
    Location
    Bucharest, Romania
    MS-Off Ver
    Office 2019
    Posts
    486

    Re: VBA Script - Cell value added into other cell

    Hi,

    Pls take a look if it helps. I did for E6. But i didn;t understand what you need for G6.
    If you can put in math like E6+F6=G6 i can help you more, but i need to understand what you need.

    Please take a look at the attached excel.


    Please Login or Register  to view this content.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    12-07-2015
    Location
    Chesterfield
    MS-Off Ver
    2013
    Posts
    24

    Re: VBA Script - Cell value added into other cell

    No problem,

    Original stock column still needs formulating to deduct the issued column items still just wanted to do this after the script is working, is this possible with VB script though?

    Here it is. http://www.filedropper.com/spreadhseetforum

  5. #5
    Forum Contributor IonutC's Avatar
    Join Date
    01-28-2016
    Location
    Bucharest, Romania
    MS-Off Ver
    Office 2019
    Posts
    486

    Re: VBA Script - Cell value added into other cell

    so in E6 you want to have the formula:

    e6= c6+d6-f6? is this what you need?

  6. #6
    Registered User
    Join Date
    12-07-2015
    Location
    Chesterfield
    MS-Off Ver
    2013
    Posts
    24

    Re: VBA Script - Cell value added into other cell

    I need the column on the right of issued to feed date into issued column, then this issued column will deduct form original stock with a formula i have not entered yet. If this makes sense

  7. #7
    Registered User
    Join Date
    12-07-2015
    Location
    Chesterfield
    MS-Off Ver
    2013
    Posts
    24

    Re: VBA Script - Cell value added into other cell

    No just need original stock - issued. The other columns are used for feeding date into original and issued columns.

  8. #8
    Forum Contributor IonutC's Avatar
    Join Date
    01-28-2016
    Location
    Bucharest, Romania
    MS-Off Ver
    Office 2019
    Posts
    486

    Re: VBA Script - Cell value added into other cell

    1. "I need the column on the right of issued to feed date into issued column"
    So col G has to feed col F. ==> what do yo u mean feed? is this a sum(+) or substraction (-) or col F = G?

    2. "this issued column will deduct form original stock with a formula i have not entered yet."

    This means you want col E - col. F?

    3. Where you want this result to be populated to col E?

  9. #9
    Registered User
    Join Date
    12-07-2015
    Location
    Chesterfield
    MS-Off Ver
    2013
    Posts
    24

    Re: VBA Script - Cell value added into other cell

    on the sheet i sent you.

    I need D6 value to add onto E6, but when the value in D6 is input a confirmation box to appear and then if yes it clicked the cell will return to '0' and then D6 will add its value onto E6.
    And the Same for G6 adding onto F6. E6 and F6 will have formula of E6-F6.

  10. #10
    Registered User
    Join Date
    12-07-2015
    Location
    Chesterfield
    MS-Off Ver
    2013
    Posts
    24

    Re: VBA Script - Cell value added into other cell

    result should be column E. Sorry I'm new to VB scripts etc.

  11. #11
    Forum Contributor IonutC's Avatar
    Join Date
    01-28-2016
    Location
    Bucharest, Romania
    MS-Off Ver
    Office 2019
    Posts
    486

    Re: VBA Script - Cell value added into other cell

    Harvey,

    pls attach you excel, cos you didnt sent me nothing and i dunno how to help you.

    Use this code after the part" SetKeycells = H6.

    Please Login or Register  to view this content.

  12. #12
    Registered User
    Join Date
    12-07-2015
    Location
    Chesterfield
    MS-Off Ver
    2013
    Posts
    24

    Re: VBA Script - Cell value added into other cell

    http://www.filedropper.com/spreadhseetforum i sent this, with the basic parts on it?

  13. #13
    Registered User
    Join Date
    12-07-2015
    Location
    Chesterfield
    MS-Off Ver
    2013
    Posts
    24

    Re: VBA Script - Cell value added into other cell

    wont let me attache for some reason through the forum

  14. #14
    Forum Contributor IonutC's Avatar
    Join Date
    01-28-2016
    Location
    Bucharest, Romania
    MS-Off Ver
    Office 2019
    Posts
    486

    Re: VBA Script - Cell value added into other cell

    I can't open it cos i have a very strong firewall

  15. #15
    Registered User
    Join Date
    12-07-2015
    Location
    Chesterfield
    MS-Off Ver
    2013
    Posts
    24

    Re: VBA Script - Cell value added into other cell

    Ahh i see,

    It wont let me attach on the forum...
    got any ideas how i can send it to you?

  16. #16
    Registered User
    Join Date
    12-07-2015
    Location
    Chesterfield
    MS-Off Ver
    2013
    Posts
    24

    Re: VBA Script - Cell value added into other cell

    https://1drv.ms/x/s!AmPxqlPEw1EQgTL-wPh26ZFFKB7g link to my one drive sheet. Try downloading this maybe?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Cell Added, Cell sold and Cell Total
    By dell1x in forum Excel General
    Replies: 1
    Last Post: 09-02-2015, 02:00 PM
  2. [SOLVED] Insert Cell made up of another specific cell with additional text added at the end
    By MICowboy13 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-16-2014, 01:30 PM
  3. date and time into cell when data added into a different cell
    By PaulH50 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-01-2014, 10:23 AM
  4. [SOLVED] Toggle fill Color in cell based on condition of cell--blank or text added.
    By moosetales in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-15-2014, 08:39 PM
  5. Replies: 2
    Last Post: 07-31-2009, 09:54 AM
  6. [SOLVED] If data added to Excel cell it automatically make's another cell equal zero
    By ianjohnmurray@hotmail.com in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-19-2005, 01:05 PM
  7. Extra added to a script
    By Bob in forum Excel General
    Replies: 2
    Last Post: 09-06-2005, 07:05 PM

Tags for this Thread

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