+ Reply to Thread
Results 1 to 2 of 2

Need help looping through multiple sheets to conditionally format the same range/sheet

  1. #1
    Registered User
    Join Date
    08-24-2012
    Location
    Columbus
    MS-Off Ver
    Excel 2010
    Posts
    46

    Need help looping through multiple sheets to conditionally format the same range/sheet

    Below is my current code for the particualr range I'm having an issue with. The highlighted line is the first issue I run into and I think it might have something to do with a section of code prior to that line in the code below. If I "select" this range it will work fine but I'm trying to avoid doing that to loop through each sheet.

    Please Login or Register  to view this content.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,357

    Re: Need help looping through multiple sheets to conditionally format the same range/sheet

    In my experience, you will need to select both the sheet and the range where you want to add the CF, much as you would in "real life".

    I generally define a worksheet variable and set it to the Active Sheet. Then, when you've finished your loop you can restore the original sheet. Use ScreenUpdating = False.


    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


+ 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. Best Way to Conditionally Format Range (Multiple Columns and Rows)?
    By freybe06 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-14-2013, 04:53 PM
  2. [SOLVED] Looping through sheets to clear a specified range, but excluding some sheets
    By d.sanchez in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-03-2013, 02:39 PM
  3. [SOLVED] Copy range from multiple sheets, into a master sheet and moving over by variable col range
    By g1eagle in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-23-2012, 01:36 PM
  4. [SOLVED] Multiple Sheets be reflected in 1 sheets as a summary (looping)
    By Kooper in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-21-2012, 03:21 AM
  5. Replies: 4
    Last Post: 06-04-2012, 12:08 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