Note: The other languages of the website are Google-translated. Back to English
Se connecter  \/ 
x
or
x
INSCRIPTION  \/ 
x

or

Comment changer la couleur d'arrière-plan ou de police en fonction de la valeur de la cellule dans Excel?

Lorsque vous traitez d'énormes données dans Excel, vous souhaiterez peut-être choisir une valeur et les mettre en évidence avec une couleur d'arrière-plan ou de police spécifique. Cet article explique comment changer rapidement la couleur d'arrière-plan ou de police en fonction des valeurs de cellule dans Excel.


Méthode 1: modifier la couleur d'arrière-plan ou de police en fonction de la valeur de la cellule de manière dynamique avec la mise en forme conditionnelle

 

Le Mise en forme conditionnelle peut vous aider à mettre en évidence les valeurs supérieures à x, inférieures à y ou comprises entre x et y.

Supposons que vous ayez une plage de données et que vous deviez maintenant colorer les valeurs entre 80 et 100, veuillez suivre les étapes suivantes:

1. Sélectionnez la plage de cellules dans laquelle vous souhaitez mettre en évidence certaines cellules, puis cliquez sur Accueil > Mise en forme conditionnelle > Nouvelle règle, voir capture d'écran:

doc mise en évidence par valeur 1

2. Dans le Nouvelle règle de formatage boîte de dialogue, sélectionnez le Mettre en forme uniquement les cellules contenant article dans le Sélectionnez un type de règle boîte, et dans la Mettre en forme uniquement les cellules avec section, spécifiez les conditions dont vous avez besoin:

  • Dans la première liste déroulante, sélectionnez le Valeur de la cellule;
  • Dans la deuxième liste déroulante, sélectionnez les critères:jusqu'à XNUMX fois;
  • Dans la troisième et la quatrième zone, entrez les conditions de filtre, telles que 80, 100.

doc mise en évidence par valeur 2

3. Puis clique Format bouton, dans le Format de cellule boîte de dialogue, définissez la couleur d'arrière-plan ou de police comme suit:

Modifiez la couleur d'arrière-plan par valeur de cellule: Changer la couleur de la police par valeur de cellule
Cliquez Niveau de remplissage onglet, puis choisissez une couleur d'arrière-plan que vous aimez Cliquez Fonte et sélectionnez la couleur de police dont vous avez besoin.
doc mise en évidence par valeur 3 doc mise en évidence par valeur 4

4. Après avoir sélectionné l'arrière-plan ou la couleur de la police, cliquez sur OK > OK pour fermer les boîtes de dialogue, et maintenant, les cellules spécifiques avec une valeur comprise entre 80 et 100 sont changées en certaines couleurs d'arrière-plan ou de police dans la sélection. Voir la capture d'écran:

Mettez en surbrillance des cellules spécifiques avec une couleur d'arrière-plan: Mettez en surbrillance des cellules spécifiques avec la couleur de la police:
doc mise en évidence par valeur 5 doc mise en évidence par valeur 6

Notes: Le Mise en forme conditionnelle est une fonctionnalité dynamique, la couleur de la cellule sera modifiée à mesure que les données changent.


Méthode 2: modifier la couleur d'arrière-plan ou de police en fonction de la valeur de la cellule de manière statique avec la fonction Rechercher

 

Parfois, vous devez appliquer une couleur de remplissage ou de police spécifique en fonction de la valeur de la cellule et faire en sorte que la couleur de remplissage ou de police ne change pas lorsque la valeur de la cellule change. Dans ce cas, vous pouvez utiliser le Retrouvez des fonction pour trouver toutes les valeurs de cellule spécifiques, puis changer la couleur d'arrière-plan ou de police selon vos besoins.

Par exemple, vous souhaitez modifier l'arrière-plan ou la couleur de la police si la valeur de la cellule contient du texte «Excel», procédez comme suit:

1. Sélectionnez la plage de données que vous souhaitez utiliser, puis cliquez sur Accueil > Rechercher et sélectionner > Retrouvez des , voir capture d'écran:

doc mise en évidence par valeur 7

2. Dans le Rechercher et remplacer boîte de dialogue, sous la Retrouvez des onglet, entrez la valeur que vous souhaitez rechercher dans le Trouvez ce que zone de texte, voir capture d'écran:

doc mise en évidence par valeur 8

Conseils: Si vous devez trouver les valeurs sensibles à la casse ou correspondre à tout le contenu de la cellule, veuillez cliquer sur le bouton Options : pour accéder aux options de recherche avancées, telles que "casse" et "Faire correspondre tout le contenu de la cellule" Comme vous le souhaitez.

3. Et puis, cliquez Trouver tout bouton, dans la zone de résultat de la recherche, cliquez sur un élément, puis appuyez sur Ctrl + A pour sélectionner tous les éléments trouvés, voir capture d'écran:

doc mise en évidence par valeur 9

4. Enfin, cliquez Fermer bouton pour fermer cette boîte de dialogue. Maintenant, vous pouvez remplir une couleur d'arrière-plan ou de police pour ces valeurs sélectionnées, voir capture d'écran:

Appliquez la couleur d'arrière-plan des cellules sélectionnées: Appliquez la couleur de la police aux cellules sélectionnées:
doc mise en évidence par valeur 10 doc mise en évidence par valeur 11

Méthode 3: changer la couleur d'arrière-plan ou de police en fonction de la valeur de la cellule de manière statique avec Kutools for Excel

 

Kutools pour Excel's Super trouver La fonctionnalité prend en charge de nombreuses conditions pour rechercher des valeurs, des chaînes de texte, des dates, des formules, des cellules formatées, etc. Après avoir trouvé et sélectionné les cellules correspondantes, vous pouvez modifier la couleur d'arrière-plan ou de police selon vos souhaits.

Après l'installation de Kutools pour Excel, veuillez faire comme ceci:

1. Sélectionnez la plage de données que vous souhaitez rechercher, puis cliquez sur Kutools > Super trouver, voir capture d'écran:

doc mise en évidence par valeur 12

2. Dans le Super trouver volet, veuillez effectuer les opérations suivantes:

  • (1.) Tout d'abord, cliquez sur le Nos valeurs icône d'option;
  • (2.) Choisissez la portée de recherche dans le Dans dérouler, dans ce cas, je choisirai Sélection;
  • (3.) Du Type liste déroulante, sélectionnez les critères que vous souhaitez utiliser;
  • (4.) Cliquez ensuite sur Retrouvez des bouton pour lister tous les résultats correspondants dans la zone de liste;
  • (5.) Enfin, cliquez sur Choisir bouton pour sélectionner les cellules.

doc mise en évidence par valeur 13

3. Et puis, toutes les cellules correspondant aux critères ont été sélectionnées en même temps, voir capture d'écran:

doc mise en évidence par valeur 14

4. Et maintenant, vous pouvez changer la couleur d'arrière-plan ou la couleur de police des cellules sélectionnées selon vos besoins.


Travail chargé le week-end, utilisation Kutools pour Excel,
vous offre un week-end relaxant et joyeux!

Le week-end, les enfants réclament de sortir jouer, mais il y a trop de travail autour de vous pour avoir du temps pour accompagner la famille. Le soleil, la plage et la mer si loin? Kutools pour Excel vous aide à Résolvez 80% d'énigmes Excel, économisez 80% de temps de travail.

pic plage
  •  Obtenir une promotion et augmenter son salaire ne sont pas loin;
  •  Contient 300 fonctionnalités avancées, résolvez 1500 scénarios d'application, certaines fonctionnalités permettent même d'économiser 99% du temps de travail;
  •  Devenez un expert Excel en 3 minutes et obtenez la reconnaissance de vos collègues ou amis;
  •  Plus besoin de rechercher des solutions sur Google, dites adieu aux formules douloureuses et aux codes VBA;
  •  Toutes les opérations répétées peuvent être effectuées en quelques clics seulement, libérez vos mains fatiguées;
  •  Seulement 39 $ mais vaut plus que le tutoriel Excel de 4000 $ des autres;
  •  Être choisi par 110,000 300 élites et plus de XNUMX entreprises bien connues;
  •  Essai gratuit de 30 jours et remboursement intégral dans les 60 jours sans aucune raison;
  •  Changez votre façon de travailler, puis changez votre style de vie!
 
Say something here...
symbols left.
You are guest
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    Arthur · 2 years ago
    Good Day,

    I have a schedule with different course modules that can be placed in different order ( 1 is metal, 2 is machining, 3 is refinishing, etc.) depending on course director preferences and staff availability.

    What I am trying to do to wrap up the spreadsheet is color code the modules across the months based on their order in the overall course. So if Metal is first and is 35 days long, the first 35 days are background colored blue, but if machining is first and is 20 days long, then the first 20 days are purple.

    How can you do and if statement that refers to a separate cell for the initial number of days, AND color the cells based on the range between 1 and 20 or 35 or whatever?

    Can I do a conditional formatting If statement with a range between numbers?

    This would have to be applied to all the modules (therefor multiple conditional formatting formulas) to account for any module being in any place in the order.
    That is the issue I have. Please offer any suggestions. Note that I have built the spreadsheet without VBA. (I've never had the opportunity to learn it)
  • To post as a guest, your comment is unpublished.
    Jeer Wales · 2 years ago
    Can I give colour for a row of values with respect to previous value for a whole row.
    Eg

    23

    45

    32

    56

    can I give red for 23 and green for 45 and again red for 32 as it is less than the previous value and green for 56 as it is more than 32.
  • To post as a guest, your comment is unpublished.
    VANESSA · 3 years ago
    I do get to change a cell colour according to the text or letter in fill in the cell e.g.-H=YELLOW,E=GREEN
    • To post as a guest, your comment is unpublished.
      skyyang · 2 years ago
      Hello, VANESSA,
      For solving your problem, please apply the Conditional Formatting feature, in the New Formatting Rule dialog box, choose the conditions as following screenshot shown:
  • To post as a guest, your comment is unpublished.
    Leon J. · 3 years ago
    how do i change the colour of cell depending on what is in that cell IE. Y=green N=red.

    thats how i need it if it has Y riten in the cell it turns green?
    • To post as a guest, your comment is unpublished.
      skyyang · 2 years ago
      Hello, Leon,
      To highlight the cells based on the cell value, you should apply the Conditional Formatting feature, go to the New Formatting Rule dialog box, and then do as the following screenshot shown to highlight the cells which are Y located as green:

      Do with the same way to format the cells N as red color.

      Please try it, hope it can help you!
  • To post as a guest, your comment is unpublished.
    zombiewhisperer · 3 years ago
    Trying to get a cell to highlight if its above a certain number, the problem is that the cell includes the number and a date. Is there a way i can get it to just look at the number? The cell will include a number+date.....1400(7/2/2018). I need the formulate just to look at the 1400 and not the date.
    any ideas?
    thanks
    Z
  • To post as a guest, your comment is unpublished.
    dhakshanamoorthy · 4 years ago
    Sir, I have value in cell A10, in A12. Now I entered a simple formula in A15 subtracting these (A10-A12). I want background color of result cell (A15) in green if A10 is large (means result in positive number) and background color in red if A12 is large ( result in negative number). Please provide solution
    • To post as a guest, your comment is unpublished.
      skyyang · 4 years ago
      Hello,
      You can select the formula cells, and then apply the Conditional Formatting > Greater than (0)-format it green, and then Less Than (0)-format it red, see screenshot:

      Please try it, hope it can help you, thank you!
  • To post as a guest, your comment is unpublished.
    Tom · 4 years ago
    If I have a date in a cell, how do I make it change to orange when it is within 30 days of coming due, yellow when it is within 15 days of coming due and red when it exceeds the date (past due)
  • To post as a guest, your comment is unpublished.
    Scott · 4 years ago
    I thought this color of cells by value was going to be a real pain. It could not have been explained more easily and clearly. Thanks. It took no less than 1-2 minutes to understand what to do.
  • To post as a guest, your comment is unpublished.
    govind · 5 years ago
    HI,

    I want if i change any value or number in any cell then that cell text color should get change for e.g. if number in any cell is 100 and I have to change it as 98 then that cell text 98 should change into red color. Is it possible in Excel?? Do clarify please
  • To post as a guest, your comment is unpublished.
    Crystal · 5 years ago
    So I am creating a excel spreadsheet for fire department reports. What I am looking for is it to calculate the days a report is overdue, unless it has been completed:

    Column A Column B Column C Column D Column E Column F
    Incident # Incident Date Todays Date Completed Date Days Overdue Todays Date

    I want column B subtracting Column C to calculate in column E unless Column D is complete. I hope this makes sense. I want to use the conditional formatting to show me in colors how long a report is overdue (with the 3 color scale). I have the formula for the number of days it is overdue to have a correct value and color scale, but I want it to remain green when the report has been completed.
  • To post as a guest, your comment is unpublished.
    Mahdi · 5 years ago
    Hi..i wanna set a rule for some cells containing Date values(such as 07-02-2016)in order to change backgrounds for example 10 days before that Date arrives or in the day that Date arrives.
    how can i do this?
  • To post as a guest, your comment is unpublished.
    subramani · 5 years ago
    Dear Sir,

    i want to Differentiate the color while entering the time , for example if i typed 9:00 a.m. that cell will show white color (but enter the time 9:01 the color must vary) and enter the time 6:00 p.m. that cell will shows white color (but enter the time 6:01 the color must vary).

    Please help me.

    thank you
  • To post as a guest, your comment is unpublished.
    shepherd · 5 years ago
    l have created a soccer excel sheet and what l am trying to do is that l want to highlight cells based on thier values that " 1-2 " must highlight red for home team and " 0-0 " must highlight yellow for draw and 2-1 green for win home team please note that the value "1-2" is in one cell and all the results will be in one column say D4:D32 , CAN SOMEONE HELP!!
  • To post as a guest, your comment is unpublished.
    AKSHAY · 5 years ago
    Sir, I have value in cell A10, in A12. Now I entered a simple formula in A15 subtracting these (A10-A12). I want background color of result cell (A15) in green if A10 is large (means result in positive number) and background color in red if A12 is large ( result in negative number). Please provide solution.
  • To post as a guest, your comment is unpublished.
    charlotte · 5 years ago
    Hello, i would like to change the colour of a number of cells in a row if column P contains any text, however the colour it changes to depends on the text in column D would you please be able to help
    many thanks.
  • To post as a guest, your comment is unpublished.
    seema · 6 years ago
    if the value of cell C1 is less than the value of cell B1 then the color of the cell D1 must become red. need formula?
  • To post as a guest, your comment is unpublished.
    thiru · 6 years ago
    hi ginge27

    select all cells & go to condittional formatting & new rules & select format only text contain & specific text,containing & give text name & select colour.
  • To post as a guest, your comment is unpublished.
    ginge27 · 6 years ago
    I'm trying to change the colour of a cell depending on the text next to it.... I'm struggling....
    I hope someone can help
  • To post as a guest, your comment is unpublished.
    Maiqueashworth · 6 years ago
    Hi
    In an earlier post:
    # Jay Chivo - Admin 2014-04-03 01:56
    following a question from VINAY JASWAL, you explain very nicely how to do a conditional cell fill if a value is greater or less than a numerical value. Can this be done for a string value? i.e. Can a C be greater than a D? I am looking to choose cell colour depending on whether the grade is greater than, equal to or less than a certain value. Thanks in anticipation.
  • To post as a guest, your comment is unpublished.
    Neil · 6 years ago
    In column A I have a list of product names and in column B I have a formula that grades the product performance in the marketplace.

    I figured out how to use the conditional formatting to change the performance metric cells based on the color gradient using the percent value. What I can't figure out how to do is change the background of the cell that contains the product name to be the same color as the conditional formatted cell.

    Can you help?
  • To post as a guest, your comment is unpublished.
    pravin · 6 years ago
    Product price priceid
    mobile 2000 101
    asset 100 102

    if i have to color priceid red where price is less than 1000

    what we will do ?
    need help
  • To post as a guest, your comment is unpublished.
    Mick Dineen · 6 years ago
    I want to format a column of cells based on completion status, so I will have complete, in-progress and open. I want to format so I have a colour for each status - green (open), yellow (in-progress) and grey (complete). I have tried to conditional format in excel with no luck.

    can you give me a solution?
  • To post as a guest, your comment is unpublished.
    jamesc · 6 years ago
    I have a sheet that calculates a value and displays it. I want the background to change based on that value. ie if the calculated value is 3 turn yellow or if 50 turn green. My range is from 1-100 and I am breaking it into 3 steps, red yellow green. thanks/jmc
  • To post as a guest, your comment is unpublished.
    Eswar · 6 years ago
    It is very much helpful..!!
  • To post as a guest, your comment is unpublished.
    Martha · 6 years ago
    Is it possible to format other cells so that their color changes depending upon the contents of another cell?

    For example, depending on the value entered into B2, can I formate G5 to change color?

    Thank you!!
  • To post as a guest, your comment is unpublished.
    Saiful Islam Jim · 6 years ago
    Hello sir, is it possible to make a cell (with date) colored automatically when only 2/3 days left to reach on that date?
  • To post as a guest, your comment is unpublished.
    Remco · 6 years ago
    Very nice, but I need to go one step futher; I need cells that contain even nulbers to change to yellow, and odd number change to a blue background. How do I do that?
  • To post as a guest, your comment is unpublished.
    SANTU · 6 years ago
    Thanks, it is working
  • To post as a guest, your comment is unpublished.
    Margaret Mc Grath · 6 years ago
    Doing work rota I need e.g. yellow cell to equal 4 (hours), green cell to equal 6 and red cell to equal 8 so when I add up 2 yellow cells plus 1 green cells plus 1 red cell I would get the answer 22 (4 x 2 + 6 + 8) I would appreciate if you could help me. Roster is done out in color not numbers.
  • To post as a guest, your comment is unpublished.
    Shane · 6 years ago
    I'd like to hightlight a cell if it begins with 215 or 218 or 223 or 227. Not sure of the command to use. Thanks!
  • To post as a guest, your comment is unpublished.
    Kartik Podugu · 6 years ago
    Detailed explanation. Thanks. It worked.
  • To post as a guest, your comment is unpublished.
    Donald Pearson · 7 years ago
    So, I figured it out 5 minutes after I sent the original message. But thank you for the information posted above, it really helped!
  • To post as a guest, your comment is unpublished.
    Donald Pearson · 7 years ago
    Is there a way to do multiple formatting rules for one column or row?
  • To post as a guest, your comment is unpublished.
    abdul · 7 years ago
    I have a worksheet with column A..reviewed by, B date and C is for follow up. Under follow up, we put YES or NO. How can i make column C colour coded for NO as Blue and YES as yellow?
  • To post as a guest, your comment is unpublished.
    imtiaz ahmad · 7 years ago
    :-| [url]ijaziffi786@hotmail.com[/url]
    thanks sir you are easy my
    work
  • To post as a guest, your comment is unpublished.
    dash · 7 years ago
    how to change everyday different color from row A1:A5
  • To post as a guest, your comment is unpublished.
    Jennifer · 7 years ago
    I have a spreadsheet that students scan an ID card into, then macro formatting to make it time/date stamp. However, I can't distinguish between when they sign in and when they sign out. This is what I want to do: Student scans card when they come in. When they leave, they scan card and either text or the box color changes to distinguish between and an in scan or an out scan. Students do nothing but scan card into a cell...do not want them to have to locate their name or choose in or out. In other words, they scan in and out but they have no idea there is a change in the color. Does that make sense and is there a way to do it?
    • To post as a guest, your comment is unpublished.
      admin_jay · 7 years ago
      [quote name="Jennifer"]I have a spreadsheet that students scan an ID card into, then macro formatting to make it time/date stamp. However, I can't distinguish between when they sign in and when they sign out. This is what I want to do: Student scans card when they come in. When they leave, they scan card and either text or the box color changes to distinguish between and an in scan or an out scan. Students do nothing but scan card into a cell...do not want them to have to locate their name or choose in or out. In other words, they scan in and out but they have no idea there is a change in the color. Does that make sense and is there a way to do it?[/quote]
      Please send me a sample of your file at jaychivo#extendoffice.com. Please replace # with @.
  • To post as a guest, your comment is unpublished.
    Faeza · 7 years ago
    hi Sir,

    I want to make a cell color at B1 & B3 using the formula condition IF b2>4 and if only b1 on top 3. Could you please advice me on this matter.
    cell a cell b
    1 7.16 1
    2 7.16 1

    3 4.03 1
    4 1.00 7
  • To post as a guest, your comment is unpublished.
    cp · 7 years ago
    Pls send me all conditional formulas..... with colour formulas.....

    Thanks
    Cp
  • To post as a guest, your comment is unpublished.
    Nic · 7 years ago
    Please help

    I have a spreadsheet measuring when a date is coming up for renewal - however it must be based on the date completed. i.e. if completed 1/1/12 it would come up for renewal 1/1/14 and so it should be highlighted in red after that date physically occurs.

    I have set the formula on one cell i.e. C5+730
    • To post as a guest, your comment is unpublished.
      admin_jay · 7 years ago
      [quote name="Nic"]Please help

      I have a spreadsheet measuring when a date is coming up for renewal - however it must be based on the date completed. i.e. if completed 1/1/12 it would come up for renewal 1/1/14 and so it should be highlighted in red after that date physically occurs.

      I have set the formula on one cell i.e. C5+730[/quote]
      Hello, please try to create some sample data in a workbook, and send it to me at jaychivo#extendoffice.com. Please replace # with @.

      Please tell me what do you want to accomplish. :-)
  • To post as a guest, your comment is unpublished.
    E-square · 7 years ago
    what if I input a Alphabetical Value:
    for Example if I input Received the cell will turn into Red
    and when I put Not Yet Received the cell will turn into Blue.
    how about that?
    I badly need an Answer. Plss!
  • To post as a guest, your comment is unpublished.
    August · 7 years ago
    Thanks to all It helped me very well
  • To post as a guest, your comment is unpublished.
    Shahid Kamal · 7 years ago
    Extremely Good.
    it helped me in my work.
  • To post as a guest, your comment is unpublished.
    Vivek Khaire · 7 years ago
    It helped me in urgent meeting in my office. Thankyou very much for help.
  • To post as a guest, your comment is unpublished.
    lola2014 · 7 years ago
    Hello, I would like to know if any of you know how to make the percentage of color fill in the cell correspond to the value of the cell.... For example if my cell value is 50% only the 50% of the cell will fill with color, if i change the value of the cell to 100% the whole cell will fill with color.

    Thankyou
    • To post as a guest, your comment is unpublished.
      Russ · 5 years ago
      Don't know how to do that, but you could approximate it by choosing different shades of a color. For example, use the most saturated blue for 100% and white for 0%, but for 40-60% select a blue that is halfway in between. Fill in the other percentages with corresponding shades.
  • To post as a guest, your comment is unpublished.
    Ieva · 7 years ago
    Does anyone knows how to do so.
    If the number is bigger than 48, change the color only of sat
  • To post as a guest, your comment is unpublished.
    Damiano · 7 years ago
    Hi, I would like to ask you if it there is the chance to do the opposite of what you showed. I explain myself better: I have colums with differen values and they are colored red and green. Now I was trying to change those values in 0 and 1 according to the color of the cells. Then 0 for red cells and 1 for green. Is it this possible? Thanks
  • To post as a guest, your comment is unpublished.
    Harrell Geron · 7 years ago
    how can a Excel function change color of the cell when the function compute a special value?
  • To post as a guest, your comment is unpublished.
    Teo · 7 years ago
    Hi. I don't know if there is possible to do what i want, but here's what i'm trying to achieve:
    Let's say i have a hundred entries with, let's say, 5 different values scattered around. I want excel to color each value with different colors. I was thinking on a formula/rule that would change the color based on the value change. It is possible?
  • To post as a guest, your comment is unpublished.
    Adil · 7 years ago
    Useful post and perfect answers
    1 Query – i want to format cells in a column with colurs based on the vloopkup value from other sheet.
    How can this be acheived?
    • To post as a guest, your comment is unpublished.
      vasantha k · 4 years ago
      have you got any reply? if so pls forward to me @ vasanthcrv@gmail.com