Results 1 to 5 of 5

Highlight cells with VBA or Conditional Formatting?

Threaded View

  1. #1
    Registered User
    Join Date
    02-20-2009
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    92

    Highlight cells with VBA or Conditional Formatting?

    Hello,

    I would like to highlight certain cells or rows based on some complex criteria and I'm not sure how to attack the problem. Either conditional formatting or VBA would be fine, I'm just not sure how to accomplish what I need with either one.

    I've attached a worksheet to go along with my explanation. I want to be able to alternately highlight data green and then yellow based on the same criteria, but alternating colors.

    The attached spreadsheet shows a "before" on one tab and the "after" on a second tab of what I would like the finished product to look like. And I've only attached an example with several rows, but for my purposes, there could actually be hundreds of rows.

    Everything hinges on column B. If the cell says "Diff", it will need to be highlighted. But if column A's fruit is the same as the prior column, I do not want the color to alternate. I only want the color to alternate when the fruit changes. So, if column A has the same fruit for 10 rows all with corresponding "Diff" in column B, then I need them all highlighted, but it should be the same color - yellow for example. Only on the next set of "Diff" for column B should the color change to blue and it could be one row or more, depending on if the fruits change or not.

    As always, I am grateful for the assistance I receive here. Thank you very much for the help.
    Attached Files Attached Files
    Last edited by starcraftbud; 04-08-2010 at 01:23 PM.

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