+ Reply to Thread
Results 1 to 4 of 4

Excel 2007 : Macro to + or - #s to exsisting cells on dif pages

  1. #1
    Registered User
    Join Date
    06-01-2011
    Location
    State College, PA
    MS-Off Ver
    Excel 2003
    Posts
    2

    Macro to + or - #s to exsisting cells on dif pages

    Im trying to create an inventory worksheet with couple of pages. 1 displaying the totals, 2 where you enter info to add to inventory, and 3 page to subtract from inventory.

    I tried making a macro that take the info from page 2 and add it to the total inventory page but could not figure out how because I keep making a loop. EX... B5 in total inventory has "99" and on the 2nd page i enter "1" that i need to add to the "99". I need help with figuring out how to make a macro or something else so that when i click a button on page 2, it will add that 1 to the 99 and = 100. Same thing for the subtraction (page 3)

    I have a feeling that this is something really easy to do and that i am overthinking it, but i can come up with a solution. If need be, i can upload my excel file if really needed

  2. #2
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Macro to + or - #s to exsisting cells on dif pages

    belayasila,

    Welcome to the forum.

    Attached is an example spreadsheet that should accomplish what you're requesting. Is something like that what you're looking for? (if so, review the code and apply it to your own workbook)

    Hope this helps,
    ~tigeravatar
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    06-01-2011
    Location
    State College, PA
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Macro to + or - #s to exsisting cells on dif pages

    Yea that is pretty much what i was looking for. just to have the add button on the add page and the subtract button on the subtract page. and after clicking on either button to have that particular pages (either + or -) values to go to 0. so if you accidentally click the button twice, it wouldn't add or subtract anything. Did you write the code through VB or did you just record a macro?

  4. #4
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Macro to + or - #s to exsisting cells on dif pages

    belayasila,

    I wrote the macro, it is not recorded. I have updated the macro so that it can be used by a button on the Add and Subtract sheet as desired. Attached is the updated example file.
    Please Login or Register  to view this content.


    Hope this helps,
    ~tigeravatar
    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)

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