+ Reply to Thread
Results 1 to 5 of 5

looping thru a range to hide where cell = #N/A and conditional formatting

  1. #1
    Forum Contributor
    Join Date
    11-22-2006
    MS-Off Ver
    2010
    Posts
    201

    looping thru a range to hide where cell = #N/A and conditional formatting

    hi, hope someone can help.

    In the attached example workbook i have a number of sheets, and i want to create a macro which will against "Analysis 1", "Report 2" and "Report 3" only but ignore the other sheets.

    Running against rows 7 to 26 only....
    1. Where column O contains an #N/A i want to hide the row, else show the row.
    2. For each cell in colmns C7:N26 if the value is below the row cell in Q then format the cell as green, if above the value in row Q then format the cell red.

    Hope this is do-able.

    thanks for your help.
    Attached Files Attached Files

  2. #2
    Forum Contributor johnjohns's Avatar
    Join Date
    11-19-2007
    Location
    Dubai, UAE
    MS-Off Ver
    2003 and 2007
    Posts
    526

    Re: looping thru a range to hide where cell = #N/A and conditional formatting

    Try this.

    rgds

    johnjohns
    Attached Files Attached Files

  3. #3
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: looping thru a range to hide where cell = #N/A and conditional formatting

    Maybe:

    Please Login or Register  to view this content.

    Dom
    Last edited by Domski; 06-16-2010 at 06:48 AM. Reason: Bad variable name
    "May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."

    Use code tags when posting your VBA code: [code] Your code here [/code]

    Remember, saying thanks only takes a second or two. Click the little star to give some Rep if you think an answer deserves it.

  4. #4
    Forum Contributor
    Join Date
    11-22-2006
    MS-Off Ver
    2010
    Posts
    201

    Re: looping thru a range to hide where cell = #N/A and conditional formatting

    Dear Johnjohns and Domski, many thanks for your help, both examples are perfect.
    thanks so much.

    Luce

  5. #5
    Forum Contributor johnjohns's Avatar
    Join Date
    11-19-2007
    Location
    Dubai, UAE
    MS-Off Ver
    2003 and 2007
    Posts
    526

    Re: looping thru a range to hide where cell = #N/A and conditional formatting

    Domski's aproach is but faster, better and easily modifiable. I preffer that to mine.

    rgds

    johnjohns

+ 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