Automatically add Text and fill color green in Cell

MikePoolDancer

New Member
Joined
Jan 29, 2022
Messages
10
Office Version
  1. 365
Platform
  1. MacOS
Hello

If value in cell A3 is bigger then value in cell A2 then in cell A1 should get filled with in green color and Text Q automatically.


could you please advice ?

Have a wonderful day
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
I'm assuming you want when A3 is greater THAN A2 then A1 = "Q" and Green Fill. If so, try this:

Book1
A
1Q
245
360
Sheet4
Cell Formulas
RangeFormula
A1A1=IF(A3>A2,"Q","")
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A1Cell Value="Q"textNO
 
Last edited:
Upvote 0
Hello

Maybe i should formule my problem differently because now i see it will not work.... :(

I'm assuming you want when A3 is greater THAN A2 then A1 = "Q" and Green Fill.

It worked to get the Q but the green color i would need more details how you do it in excel.

Also now i wanted to program the cell red when A3 is Lower then A2 and get also the Q.... Is this possible ? For me the best would be to it in one formula and then i would copy the formula... if it would be possible .....

This is to get "Q" in both versions. Now i m missing the fill color and possibly one formula for each way in Plus or Negativ

=IF(A3>A2,"Q","")

=IF(A3<A2,"Q","")

Enjoy your best day
 
Upvote 0
Instead of two formulas to get < or >, just do a not equal.
in cell A1 use this formula:
Excel Formula:
=IF(A2<>A3,"Q","")

As far as conditional formatting:
1. Select cell A1
2. In "Home" ribbon select CONDITIONAL FORMATTING
3. Select "Highlight Cells Rule", Select "Equal to":
1715428261780.png


type Q in the value bar, click "custom format" in the "with" format selector:
1715428348303.png


Select the "Fill" tab, choose your color and click OK.
1715428406725.png
 
Upvote 0
Hello

Did u try it and did it work ?

When A3 is > then A2 THEN A1 = Q cell color fill green ? Yes it works Q is in the cell and fill green

When A3 is < then A2 THEN A1 = Q cell color fill red ? Yes Q is in the cell and cell color is green and i should be cell red collor

For me i can only make it one cell color when Q is in the cell and is ignoring if A3 or A2 is a difference, it shows cell green.

Can we focus to change the color in the cell A1 depending if cell A2 and A3 are different ? I Will put the Q in manually...

Thanks so much
 
Upvote 0
my bad. I did not put the rule for RED, ..
the conditional formatting rules should be
for Green:
=AND(A3>A2,A1="Q")

for RED
=AND(A3<A2,A1="Q")

Book1
A
1Q
265
360
Sheet1
Cell Formulas
RangeFormula
A1A1=IF(A2<>A3,"Q","")
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A1Expression=AND(A3<A2,A1="Q")textNO
A1Expression=AND(A3>A2,A1="Q")textNO


This video may help you learn more about conditional formatting:
 
Upvote 0
Hello

It works perfect, great :)

Now i have to do it on multiple ROWS.

Do i have to manually fill in each CELL Location ROW number / COLUM number or is there something like a RANGE to fil in the conditional formating? I mean now it should be working in ROWS and now as we did it in COLUMS.

For Example E3 until E31 and J3 until J31 and in the CELL I3 until I31 must show Q and COLLOR green or red if Value is greater / smaler then E3 and J3 for each row until row 31.

Very pleased with your support
 
Upvote 0
Conditional formatting, just like formulas will copy as the references (absolute, partial, relative) indicate as you drag or copy/paste them.
Take a look at the video to understand that better.

Happy to help.
 
Upvote 0
Yeah i just did it and it works 100%. :)

Now when in CELL A3 value is 1 and in CELL A2 value is 1 then in CELL A1 value is not collar stays white and no text. Is it possible solve this problem by adding a formula in the Conditional Formating ? If it is equal i would like to be Q and fill green but also having the option to make it red from time to time.

thanks
 
Upvote 0
Your original question was for only greater than only only less than. 1 = 1 is neither, therefore no formatting.
You can change one of the conditional formatting rules by adding an "=" after of "<" or ">".

Under what circumstances would you want to see a Q when the two are or not equal? You would have to have another comparison in your calculation to further change the value or formatting.
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,323
Members
452,635
Latest member
laura12345

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top