+ Reply to Thread
Results 1 to 6 of 6

macro that inserts data on last row (first empty row) instead of absolute row?

  1. #1
    Registered User
    Join Date
    08-27-2014
    Location
    USA
    MS-Off Ver
    2013
    Posts
    14

    macro that inserts data on last row (first empty row) instead of absolute row?

    I have a forecaster built in excel for my income/expenses, and have buttons set up where I can press each one and it automatically inserts the following data at the top of my ledger section which starts on row 26 (the data is specified to go on row 26). I'd like to start having the data inserted on the very last row (or first empty row, however you want to look at it) of the ledger section instead of the first. Does anyone know how I can easily accomplish this? An example of the macro I use is pasted below. Thanks!

    Please Login or Register  to view this content.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2403 Win 11 Home 64 Bit
    Posts
    23,810

    Re: macro that inserts data on last row (first empty row) instead of absolute row?

    To select the first empty row in Column A

    Please Login or Register  to view this content.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    08-27-2014
    Location
    USA
    MS-Off Ver
    2013
    Posts
    14

    Re: macro that inserts data on last row (first empty row) instead of absolute row?

    Quote Originally Posted by alansidman View Post
    To select the first empty row in Column A

    Please Login or Register  to view this content.
    I have about 20 macros just like my example on one module page. How do I make them all have this behavior? Do I have to put this code in 20 times? This obviously isn't my specialty, but thank you for the help so far.

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2403 Win 11 Home 64 Bit
    Posts
    23,810

    Re: macro that inserts data on last row (first empty row) instead of absolute row?

    If they all act independently, then yes.

  5. #5
    Registered User
    Join Date
    08-27-2014
    Location
    USA
    MS-Off Ver
    2013
    Posts
    14

    Re: macro that inserts data on last row (first empty row) instead of absolute row?

    Quote Originally Posted by alansidman View Post
    If they all act independently, then yes.
    Ah, I see. With this new code, how do I specify to insert what I want to include in Column B? Same with Column C & E. They'll no longer be on row 26, so how would I tell it to insert the data into the appropriate cells on the row found via the new last row code?

  6. #6
    Registered User
    Join Date
    08-27-2014
    Location
    USA
    MS-Off Ver
    2013
    Posts
    14

    Re: macro that inserts data on last row (first empty row) instead of absolute row?

    I was able to make it work like this, and then ends by selecting A1 so you're back at the top. Thanks again for the help.

    Please Login or Register  to view this content.

  7. #7
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2403 Win 11 Home 64 Bit
    Posts
    23,810

    Re: macro that inserts data on last row (first empty row) instead of absolute row?

    Glad to hear you figured it out.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

+ 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. Need Macro that inserts two rows with data after value changes
    By KapitalD in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-29-2014, 11:03 PM
  2. Creating macro that inserts data into a cell based on certain critera
    By anjoseph9626 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-19-2013, 07:49 PM
  3. Macro that inserts updated data on new line
    By tiwele in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-05-2013, 12:02 PM
  4. [SOLVED] Macro which inserts a column and cut and pastes data
    By s b via OfficeKB.com in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-04-2005, 01:05 PM
  5. Macro based Import Data Inserts Cells, I want Replace
    By bramweisman in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-09-2005, 01:05 AM

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