excel condition

%3CLINGO-SUB%20id%3D%22lingo-sub-2391909%22%20slang%3D%22en-US%22%3Eexcel%20condition%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2391909%22%20slang%3D%22en-US%22%3E%3CP%3EI'm%20having%20trouble%20inserting%20a%20condition%20in%20the%20excel%20cell.%20I%20have%20two%20columns%20with%20values%2C%20I%20would%20like%20for%20example%2C%20whenever%20the%20value%20in%20the%20cell%20of%20column%20A%20is%20greater%20than%20or%20equal%20to%20the%20cell%20in%20the%20column%20B%2C%20that%20the%20cell%20in%20the%20column%20A%20fills%20with%20a%20color.%20For%20example%2C%20If%20A1%26gt%3B%20%3D%20B1%2C%20fill%20in%20red.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2391909%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2391969%22%20slang%3D%22en-US%22%3ERe%3A%20excel%20condition%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2391969%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1064867%22%20target%3D%22_blank%22%3E%40Rubia_Armini%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ESelect%20A1%3AA100%2C%20for%20example.%20A1%20should%20be%20the%20active%20cell%20in%20the%20selection.%3C%2FP%3E%0A%3CP%3EOn%20the%20Home%20tab%20of%20the%20ribbon%2C%20click%20Conditional%20Formatting%20%26gt%3B%20New%20Rule...%3C%2FP%3E%0A%3CP%3ESelect%20'Use%20a%20formula%20to%20determine%20which%20cells%20to%20format'.%3C%2FP%3E%0A%3CP%3EEnter%20the%20formula%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3DAND(A1%26lt%3B%26gt%3B%22%22%2CA1%26gt%3B%3DB1)%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EClick%20Format...%3C%2FP%3E%0A%3CP%3EActivate%20the%20Fill%20tab.%3C%2FP%3E%0A%3CP%3ESelect%20red.%3C%2FP%3E%0A%3CP%3EClick%20OK%2C%20then%20click%20OK%20again.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2392119%22%20slang%3D%22en-US%22%3ERe%3A%20excel%20condition%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2392119%22%20slang%3D%22en-US%22%3EThank%20you%20for%20answer%20me.%20I%20did%20exactaly%20as%20you%20said%20and%20didn't%20work%20(Incling%20doing%20CTRLc%20CTRLv%20of%20your%20formule).%20%3CLI-EMOJI%20id%3D%22lia_confused-face%22%20title%3D%22%3Aconfused_face%3A%22%3E%3C%2FLI-EMOJI%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2393126%22%20slang%3D%22en-US%22%3ERe%3A%20excel%20condition%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2393126%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1064867%22%20target%3D%22_blank%22%3E%40Rubia_Armini%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIt%20should%20work%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22S0454.png%22%20style%3D%22width%3A%20155px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F284367iE6B125D8F0C7B088%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22S0454.png%22%20alt%3D%22S0454.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EPlease%20attach%20a%20workbook%20that%20demonstrates%20the%20problem.%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

I'm having trouble inserting a condition in the excel cell. I have two columns with values, I would like for example, whenever the value in the cell of column A is greater than or equal to the cell in the column B, that the cell in the column A fills with a color. For example, If A1> = B1, fill in red.

3 Replies

@Rubia_Armini 

Select A1:A100, for example. A1 should be the active cell in the selection.

On the Home tab of the ribbon, click Conditional Formatting > New Rule...

Select 'Use a formula to determine which cells to format'.

Enter the formula

 

=AND(A1<>"",A1>=B1)

 

Click Format...

Activate the Fill tab.

Select red.

Click OK, then click OK again.

Thank you for answer me. I did exactaly as you said and didn't work (Incling doing CTRLc CTRLv of your formule).

@Rubia_Armini 

It should work:

S0454.png

Please attach a workbook that demonstrates the problem.