+ Reply to Thread
Results 1 to 9 of 9

conditional formating

  1. #1
    Forum Contributor
    Join Date
    04-21-2010
    Location
    Budapest
    MS-Off Ver
    Excel 2010
    Posts
    155

    conditional formating

    Could you help me to modify the next under defined macro? My request is that depending of the value of the column N I need a background change in the same row but just column A.
    Example: if cell N9 value is 1 then change the background colour of cell A9 (same row) and so on. Other columns contains more data where i don't need conditional formatting.

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by ccsmith; 07-01-2010 at 08:34 AM.

  2. #2
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,283

    Re: conditional formating

    Try this:
    Please Login or Register  to view this content.
    Remember what the dormouse said
    Feed your head

  3. #3
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: conditional formating

    Try this
    Please Login or Register  to view this content.

    Are the colour values for 5 & 6 meant to be the same?

    Hope this helps

    [EDIT]

    Added Case Else as per Rs' solution

    Go with romperstomper his code allows multi cell selection
    Mine is a cop out if more than one cell is selected.
    Last edited by Marcol; 07-01-2010 at 08:30 AM. Reason: P.S. Added
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  4. #4
    Forum Contributor
    Join Date
    04-21-2010
    Location
    Budapest
    MS-Off Ver
    Excel 2010
    Posts
    155

    Re: conditional formating

    It's working. You are great. Thanks for your help.

  5. #5
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: conditional formating

    Maybe a combination of both approaches?
    Please Login or Register  to view this content.

    This allows Column N to be dynamic, ie you are not restricted to N9:N200

    Hope this helps.

    [EDIT]
    Error in code, detected by romperstomper post #6, corrected

    [EDIT 2]
    Code now handles multiple deletion of values in N
    Last edited by Marcol; 07-01-2010 at 05:21 PM. Reason: Added more thought to solution

  6. #6
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,283

    Re: conditional formating

    You seem to be missing an Intersect in there...

  7. #7
    Forum Contributor
    Join Date
    04-21-2010
    Location
    Budapest
    MS-Off Ver
    Excel 2010
    Posts
    155

    Re: conditional formating

    Marcol: it seems that your code is working perfectly beacuse my values in N columns derive from other function and change dynamicaly.
    Thanks.

  8. #8
    Forum Contributor
    Join Date
    04-21-2010
    Location
    Budapest
    MS-Off Ver
    Excel 2010
    Posts
    155

    Re: conditional formating

    running the macro will take some minuts when calculating every row.
    Couldn't be set the range limited N9:N200?

  9. #9
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: conditional formating

    There was an error in the code I suggested, noticed by romperstomper.
    I have corrected this in post #5, rather than post again, there should be no problem with it now.

    I have also added the facilty to allow multiple deletion of values in column N

    My apologies
    Last edited by Marcol; 07-01-2010 at 05:24 PM. Reason: Re-booted brain

+ 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