+ Reply to Thread
Results 1 to 2 of 2

Macro for adding cell values to end of a list?

  1. #1
    Registered User
    Join Date
    07-12-2013
    Location
    Dominican Republic
    MS-Off Ver
    Excel 2010
    Posts
    1

    Macro for adding cell values to end of a list?

    I'm working on a small invoice-creation/inventory-status system. Here's how it works:

    There's a sheet(we'll call it SheetA) with an empty invoice template that has to be filled out. A button (ButtonA) runs a macro (MacroA) that creates a copy of SheetA (with its values) and then clears out the values on SheetA so it can be filled out again to create a new invoice.

    I want to create a button (ButtonB) that runs a macro (MacroB) which takes the values from specified cells in the filled out form (before using ButtonA, which runs MacroA which clear/deletes these values) and places these values in another sheet (SheetB). Values such as quantities being sold and invoice ID number.

    This can easily be done by creating a macro that copies and pastes these values from SheetA into specified cells in SheetB; but that will only work for the first invoice created. When a new invoice is created, the values would be placed in the same cells, replacing the values from the last invoice. My problem lies here:

    The purpose here is to create a vertical list of quantities sold, next to their corresponding invoice ID number, so these can be added up and subtracted from inventory in existence. Now, what happens when a new invoice is created and I want these values to be placed BELOW the cells from the last invoice created? Is there a way to program MacroB so that every time a new invoice is created, the cell values are added at the end of the list being created in SheetB?

  2. #2
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Macro for adding cell values to end of a list?

    Hi, asdf45223,

    mayne use something like this to find the first free row in the destination Sheet:
    Please Login or Register  to view this content.
    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

+ 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. adding up values from a list of dates
    By toplad86 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-02-2013, 03:19 PM
  2. [SOLVED] List box's macro: Adding index formula to Linked Cell
    By DavidRoger in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 02-28-2013, 07:33 PM
  3. List box's macro: Adding index formula to Linked Cell
    By DavidRoger in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-27-2013, 09:42 PM
  4. Replies: 7
    Last Post: 06-05-2012, 03:14 AM
  5. macro which saves the cell values of every column of every worksheet to one txt list?
    By forhekset in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-11-2011, 06:37 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