+ Reply to Thread
Results 1 to 8 of 8

Macro hangs up in formatting loop

  1. #1
    Forum Contributor
    Join Date
    10-16-2010
    Location
    Memphis, TN
    MS-Off Ver
    Excel 2003, 2010
    Posts
    151

    Macro hangs up in formatting loop

    I have a report that I am trying to automate and I have run into a snag in getting the formatting to work. I am trying to alternate row color to make it a bit easier to read but it seems to want to hang up in the loop. Here is the code I am running, I don't see what I am doing wrong, and would appreciate any suggestions.

    Please Login or Register  to view this content.
    Thanks!
    Last edited by jacob@thepenpoint; 07-09-2013 at 08:52 AM.
    Jacob Albers
    Excel 2003 & 2010

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

    Re: Macro hangs up in formatting loop

    Why not do this with conditional formatting?

    http://www.osceola.k12.wi.us/docs/Ha...Formatting.pdf
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Forum Contributor
    Join Date
    10-16-2010
    Location
    Memphis, TN
    MS-Off Ver
    Excel 2003, 2010
    Posts
    151

    Re: Macro hangs up in formatting loop

    I will give that a try. For some reason, conditional formatting doesn't seem to like me very well, which is odd cause I'm really a nice guy.

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Macro hangs up in formatting loop

    ...and of course if you're using Excel 2007 or later there is the 'Format As Table' standard functionality which offers many different ways of formatting a range with a pyjama stripe look. No need for a macro.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  5. #5
    Forum Contributor
    Join Date
    10-16-2010
    Location
    Memphis, TN
    MS-Off Ver
    Excel 2003, 2010
    Posts
    151

    Re: Macro hangs up in formatting loop

    Thanks guys! This will give me something to work through over the long weekend.

  6. #6
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Macro hangs up in formatting loop

    Quote Originally Posted by jacob@thepenpoint View Post
    Thanks guys! This will give me something to work through over the long weekend.
    Yes, I had a similar comment from one of our erstwhile cousins in an email today and I was somewhat puzzled by the long weekend reference until I twigged.

    So perhaps you’ll forgive me if there’s just a little bit of me that wishes we hadn’t lost our American colonies.

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

    Re: Macro hangs up in formatting loop

    If you hadn't, we wouldn't be celebrating ...

  8. #8
    Forum Contributor
    Join Date
    10-16-2010
    Location
    Memphis, TN
    MS-Off Ver
    Excel 2003, 2010
    Posts
    151

    Re: Macro hangs up in formatting loop

    Thanks guys! The conditional formatting worked like a champ! I am still having some hanging during formatting but the shading is almost instantaneous.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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