+ Reply to Thread
Results 1 to 3 of 3

recalculate last row

  1. #1
    Forum Contributor
    Join Date
    03-12-2018
    Location
    London, England
    MS-Off Ver
    2016
    Posts
    113

    recalculate last row

    hello everyone
    I am stuck in the web to find a solution to something I think it's very simple, but somehow all topics around the forums are not clear to me.

    Here the code

    Please Login or Register  to view this content.
    So, the first time I launch the macro, ti works perfectly. It finds the first empty cell in column HI (starts counting from row 5), copies the content of cell in column HH at row number found and pastes it in the empty cell in column HI.

    The problem is that when I launch the macro again, it keeps overwriting the same cell and I don't know how to make it re-find the last row number again. It seems he stores the variable found the first time... what should I put to make it work?

    I basically need that every time I launch the macro, it goes down by one row.

    Thank you everyone for helping me with this.

  2. #2
    Forum Guru
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,445

    Re: recalculate last row

    lastrowhv=Cells(Rows.Count, "HI").End(xlUp).Row+1

    Finds the next empty row in column HI

  3. #3
    Valued Forum Contributor WasWodge's Avatar
    Join Date
    08-02-2010
    Location
    Hampshire,England
    MS-Off Ver
    Office 365 and Office 2010
    Posts
    882

    Re: recalculate last row

    Assuming that the cell you are copying from is correct maybe...
    Please Login or Register  to view this content.
    or
    Please Login or Register  to view this content.
    If my solution worked (or not) please let me know. If your question is answered then please remember to mark it solved

    Computers are like air conditioners. They work fine until you start opening windows. ~Author Unknown

+ 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. Function won't recalculate
    By RayJ in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-21-2013, 05:17 PM
  2. Recalculate until condition met
    By ab14 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-30-2012, 07:22 AM
  3. Checkbox and recalculate
    By lemonstar in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-24-2008, 11:31 AM
  4. Cell does not always recalculate
    By mylesdw in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-17-2008, 09:52 PM
  5. Recalculate on condition
    By DavidObeid in forum Excel General
    Replies: 3
    Last Post: 08-04-2006, 12:11 AM
  6. My VBA Function Won't Recalculate
    By soteman2005 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-01-2005, 10:55 AM
  7. [SOLVED] Auto recalculate?
    By Lee Harris in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-11-2005, 09:00 PM
  8. [SOLVED] Won't recalculate
    By Erin in forum Excel General
    Replies: 2
    Last Post: 01-08-2005, 12:06 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