+ Reply to Thread
Results 1 to 7 of 7

Conditional Formatting

  1. #1
    Registered User
    Join Date
    01-31-2024
    Location
    Zimbabwe
    MS-Off Ver
    Excel 2021
    Posts
    4

    Conditional Formatting

    Hi,

    I have a table with different projects and every project has several rows. I would like to color the first four columns of each project, so that each project has an own distinct color. Every project has a unique number. My thinking was to apply a conditional formatting formula but I am not sure which one.
    Last edited by Papabenedetto; 01-31-2024 at 05:02 PM.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Conditional Formatting

    In conditional formatting, each unique set of formats you want to use requires a distinct rule. That is, if you have 10 projects with 10 colors you will need 10 rules. Outside of that you haven't provided enough information to give you a concrete solution. Please consider attaching a sample file so we can see what your data looks like.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    01-31-2024
    Location
    Zimbabwe
    MS-Off Ver
    Excel 2021
    Posts
    4

    Re: Conditional Formatting

    Thank you very much. I want to avoid to have 10 distinct rules, I am looking for a single formula that could solve the issue. What I have been trying is to compare the the first project number with the following values, using the following formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    . Unfortunately, this formula only helps me to compare all project numbers to the first (1) project number. As a result, rows of the first project will have one color and all other projects another color.


    I am attaching a sample file that shows what my data looks like. I colored the columns and rows the way I want the sheet to look like. Maybe conditional formatting is not the solution to what I am looking for? Grateful for any advice.
    Attached Images Attached Images

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,869

    Re: Conditional Formatting

    There is no single formula that will solve this. It's one CF rule per colour. VBA might work, but you'd still need to program for each eventuality.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  5. #5
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Conditional Formatting

    Quote Originally Posted by Papabenedetto View Post
    I am looking for a single formula that could solve the issue
    It's not possible. You can use one rule to get alternating colors, but you must have one rule for each different color.

    CF formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    A
    1
    Project
    2
    1
    3
    1
    4
    1
    5
    1
    6
    2
    7
    2
    8
    3
    9
    3
    10
    3
    11
    4
    12
    5
    13
    5
    14
    5
    Alt colors



    I am attaching a sample file that shows what my data looks like.
    It's clear what you want to do, but note that you have not attached a file, you have attached a picture of your screen.

    As Ali noted, this could be done with VBA but you may find that more complicated than using multiple CF rules.

  6. #6
    Registered User
    Join Date
    01-31-2024
    Location
    Zimbabwe
    MS-Off Ver
    Excel 2021
    Posts
    4

    Re: Conditional Formatting

    Thank you for your assistance!

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,869

    Re: Conditional Formatting

    Next time, please come up with a descriptive, NON-GENERIC thread title.

    Glad to have helped.

    If that takes care of your original question, please choose Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, if you have not already done so, you may not be aware that you can thank anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of each of those who offered help.

+ 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. [SOLVED] Conditional Formatting based on another cells Conditional Formatting
    By chriskay in forum Excel General
    Replies: 4
    Last Post: 08-22-2019, 05:33 AM
  2. [SOLVED] Override conditional formatting (in general, without changing the conditional formatting)
    By Stormin' in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 11-21-2017, 07:15 AM
  3. Conditional Formatting Removing Previous Conditional Formatting?
    By CravingGod in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-04-2016, 01:02 PM
  4. Replies: 6
    Last Post: 01-08-2016, 06:44 PM
  5. Opening xlsm files with conditional formatting opens with removed conditional formatting
    By Martijn.Steenbakker in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-07-2014, 05:38 AM
  6. Replies: 1
    Last Post: 09-20-2013, 06:23 PM
  7. Replies: 3
    Last Post: 05-15-2012, 04:13 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