+ Reply to Thread
Results 1 to 2 of 2

For Each Problems

  1. #1
    Registered User
    Join Date
    06-19-2012
    Location
    Dallas, Texas
    MS-Off Ver
    Excel 2010
    Posts
    40

    For Each Problems

    In my sheet I have attached, I am runnnig a for each loop. I want the macro to run through the sheet and call a series of sub-routines for each hotel listed. What I want to happen is to run all my hotels that have "Friday" selected with one macro.

    I have a For each cell in the hotel information table set up. I want that to find all the instance of Friday for example, then run a series of subs for that Friday, then move on to the next Friday.

    The subs import the files listed in colums k-p, so I also need to figure out how to action those. My idea was to start a variable that would tell me which row was highlighted and then open the files, but if there is a simpler way, I'm open to it.

    I really just need the basic outline for the loop, I have all the sub-routines finished in another version of this where I setup which hotel from the table I want to run the reporting on. This is all standardized, so I figured out I can actually run all these on my coffee break if I can crack through this. Any help is appreciated.

    I have this started, but it is a nightmare.

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by arlu1201; 10-11-2012 at 06:16 AM. Reason: Use code tags in future.

  2. #2
    Registered User
    Join Date
    06-19-2012
    Location
    Dallas, Texas
    MS-Off Ver
    Excel 2010
    Posts
    40

    Re: For Each Problems

    Could a do loop make this simpler? I'm not married to a for each system unless it is necessary. Any help is greatly appreciated.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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