+ Reply to Thread
Results 1 to 4 of 4

Loop through Macros Until Reaching Blank Cell

  1. #1
    Forum Contributor
    Join Date
    06-06-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    180

    Loop through Macros Until Reaching Blank Cell

    Hi all,

    I am trying to create code to run through Rules in column 'A' until the code reaches a blank cell. I want the code to Identify the the rule in the first cell e.g. Cell A8 which activates a macro e.g. Rule8(). I then want the code to move onto cell A9 and for the code to do the same i.e. identify the rule in the cell e.g. Rule52 and then run macro Rule52 (). This would work until it reaches a blank cell. I tried the below but could not get this to work. I am currently researching Do Until loops. Any help would be creatly appreciated.


    Please Login or Register  to view this content.
    Kind regards,

    James Elwell

  2. #2
    Valued Forum Contributor
    Join Date
    12-02-2012
    Location
    Melbourne, VIC
    MS-Off Ver
    Excel 2016
    Posts
    750

    Re: Loop through Macros Until Reaching Blank Cell

    try this:
    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    06-06-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    180

    Re: Loop through Macros Until Reaching Blank Cell

    Hi jewelsharma,

    Thanks for your help. I tried the code but encountered the following issues:- An error at point 'Cells(.Rows.Count, "A").End(xlUp).Row' and a syntax error at 'Application.Run ThisWorkbook.Worksheets("Sheet2").Range("A" & i).Value)'.I removed the '.' before the Rows to resolve the first issue.

  4. #4
    Valued Forum Contributor
    Join Date
    12-02-2012
    Location
    Melbourne, VIC
    MS-Off Ver
    Excel 2016
    Posts
    750

    Arrow Re: Loop through Macros Until Reaching Blank Cell

    Sorry for the typo. try this:
    Please Login or Register  to view this content.
    Let me know if anything.

+ 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. Loop Across Columns...If Blank Cell, Loop Down Rows
    By flindy87 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-25-2014, 07:05 PM
  2. Loop Across Columns If Blank Cell Loop Down Rows
    By flindy87 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-05-2014, 10:22 AM
  3. [SOLVED] Loop to copy rows from two worksheets until reaching empty row
    By Brukernavn in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-21-2013, 05:06 AM
  4. [SOLVED] Is it possible to create a macro that repeats for the cell below till reaching a blank cel
    By CDNcameron in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-05-2012, 06:07 PM
  5. [SOLVED] loop macros until reach blank in adjacent column
    By McKCollins in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-07-2006, 06:10 PM

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