+ Reply to Thread
Results 1 to 3 of 3

Nested For Each loops

  1. #1
    Registered User
    Join Date
    06-19-2015
    Location
    Michigan
    MS-Off Ver
    2010
    Posts
    30

    Nested For Each loops

    Hello!

    I am trying to write a macro to loop through a bunch of worksheets and will perform another set of loops if a condition is met.
    Here is my macro so far:
    Please Login or Register  to view this content.
    As of now, everything functions perfectly, except it only performs the loops on one worksheet and not through all of them. I need it to check if the active worksheet has text in cell A1, and if it does, then to perform the loops through "Rng". Whether or not A1 has text, it should go to the next worksheet after everything is done.

    Any ideas?

  2. #2
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Nested For Each loops

    You need to specify the worksheet when you referring to a range. Give this a try
    Please Login or Register  to view this content.

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Nested For Each loops

    Maybe ...

    Please Login or Register  to view this content.
    Entia non sunt multiplicanda sine necessitate

+ 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. Nested Loops
    By asdasdasdadw in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-24-2014, 02:30 PM
  2. [SOLVED] Nested IF loops More than 7 Need Help
    By EricSomin in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-31-2013, 02:25 PM
  3. [SOLVED] Help with nested loops
    By wishmaker in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-23-2013, 11:03 AM
  4. nested loops
    By short_n_curly in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-22-2012, 11:10 AM
  5. Nested loops VBA
    By zurich in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-06-2012, 03:21 PM
  6. Nested Do Loops
    By ross88guy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-08-2010, 09:10 AM
  7. Nested Loops
    By Rick_Stanich in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-11-2009, 04:14 PM
  8. [SOLVED] Many Nested loops
    By naterator in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-19-2006, 05:45 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