+ Reply to Thread
Results 1 to 6 of 6

Inserting a dedicated column for automated arithmetic in an ajacent cell

  1. #1
    Registered User
    Join Date
    06-16-2008
    Posts
    3

    Inserting a dedicated column for automated arithmetic in an ajacent cell

    OK, i really hope someone can help with this as it will make my job a whole lot easier ok what i want to add to my spreadsheet is a column wherein i can enter a number which will then be automatically subtracted from the cell ajacent to it. I work in a distribution warehouse and require an extra column to provide a pick history which will be taken off the total amount which is in the column next door...then if i can do that i would like to add another column for stock added, it must be a formula which will work for all rows.Any help with this would be very greatly appreciated as i have been trying to work it out but have been going round in circles. thanks so much.

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582
    The attached workbook will subtract what is in column 3 (C) from 2 (B) and then erase the cell in column 3. The code is attached to the worksheet (right clikc on the tab and View code). It's pretty self explanitory if you review the code. Let me know if you have questions.

    ChemistB
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    06-16-2008
    Posts
    3
    Thanks for that, its a great help really appreciate it... if i was to do the same on my worksheet at work would i just need to copy and paste the code from what you just gave me and change the cells it's refering to?As you can probably tell I am not experienced in using VBA....well in all honesty I have never used it before in my life so please excuse my ignorance. also without being greedy and asking for too much from anyone is it possible at all to do the same for an addition column and so that the numbers inserted do not automatically dissapear?Any help at all is greatly appreciated thanks again

  4. #4
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582
    Yes, the code should be the same with modifications to make sure you are referring to the right cells.
    is it possible at all to do the same for an addition column and so that the numbers inserted do not automatically dissapear?
    Sounds possible. What do you want added to what? If you remove this line from the code
    Please Login or Register  to view this content.
    then the value is not erased after calculation.

    ChemistB

  5. #5
    Registered User
    Join Date
    06-16-2008
    Posts
    3
    Ahh brilliant ill give that a try now cheers, with regards to the addition, i would ideally like another column doing the same as the subtraction column but adding on any number placed in the cell to be added to the total column, i really appreciate your help on this!thanks

  6. #6
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582
    Here's an updated example. I added similar code to the previous code. This time I also removed the line where it removes (for the addition column) your entry.

    Make sense?

    ChemistB
    Attached Files Attached Files

+ 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