+ Reply to Thread
Results 1 to 2 of 2

Run a macro when the range of numbered cells change

  1. #1
    Registered User
    Join Date
    04-28-2021
    Location
    Sydney Australia
    MS-Off Ver
    2013
    Posts
    1

    Question Run a macro when the range of numbered cells change

    Hi,

    I am new with creating macros and would like to ask for some help.

    I have created a macro running =LEFT(D2,3) - which works well, I understand this command

    But each week when I receive the new data, the number of lines are not the same as previous and the macro will either stop short or go further down in the blank cells.

    What do I need to include to make the macro stop on the last cell (before the empty cell) each time?

  2. #2
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    365 Pro Plus
    Posts
    2,274

    Re: Run a macro when the range of numbered cells change

    You would first need to find the number of the last row of data, and adjust your loop accordingly.

    One of many possible ways to do this...
    Please Login or Register  to view this content.

+ 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. [SOLVED] Macro range of cells change
    By CHRISTINEKENDALL93 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 11-09-2018, 12:44 PM
  2. [SOLVED] Change On_Open macro to a cell change in a range of cells
    By davidpierce in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-27-2015, 02:46 PM
  3. Combine cells of portions of a numbered list into a continous numbered list
    By AusTempest in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-17-2014, 01:55 AM
  4. Need a macro to copy 2 cells in an even numbered row to an odd numbered row
    By shadowamc in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-22-2014, 11:18 PM
  5. Macro to change all borders in a range of cells
    By DJFudd in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-13-2013, 01:00 AM
  6. Macro to change all borders in a range of cells
    By DJFudd in forum Outlook Formatting & Functions
    Replies: 1
    Last Post: 04-13-2013, 01:00 AM
  7. Change range of cells within VBA macro and copy and paste to fixed cell range
    By Mannyny in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 07-20-2012, 11:51 AM

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