Conditional Formatting to Highlight Cells Based on Yes/No Values

%3CLINGO-SUB%20id%3D%22lingo-sub-1589666%22%20slang%3D%22en-US%22%3EConditional%20Formatting%20to%20Highlight%20Cells%20Based%20on%20Yes%2FNo%20Values%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1589666%22%20slang%3D%22en-US%22%3E%3CP%3EIn%20the%20work%20I%20am%20doing%2C%20I'm%20finding%20that%20having%20spreadsheets%20to%20manage%20specific%20data%20and%20responses%20to%20forms%2C%20both%20for%20analysis%20of%20frequent%20responses%20and%20tally%20of%20yes%2Fno%20responses%20on%20forms%2C%20is%20exceptionally%20helpful.%26nbsp%3B%20What%20I%20struggle%20with%2C%20being%20a%20not-to-savvy%20user%20of%20Excel%2C%20is%20how%20to%20conditionally%20format%20a%20row%20of%20cells%20based%20on%20the%20yes%2Fno%20value%20of%20a%20single%20cell%20on%20that%20row.%26nbsp%3B%20The%20file%20below%20is%20the%20spread%20I%20am%20attempting%20to%20develop%20and%20having%20lines%20highlighted%20depending%20on%20the%20response%20of%20yes%20or%20no%20will%20make%20further%20use%20of%20and%20analysis%20of%20the%20data%20more%20efficient%20for%20us.%26nbsp%3B%20I've%20attempted%20to%20use%20(and%20edit%20for%20response%20values)%20the%20formulas%20and%20make%20them%20from%20scratch%20but%20I%20seem%20to%20be%20missing%20something%20in%20the%20process.%26nbsp%3B%20To%20specify%20what%20I%20want%20for%20a%20reaction%20to%20%22Yes%22%20is%20a%20row%20that%20is%20highlighted%20light%20green%20and%20for%20%22No%22%2C%20a%20row%20that%20is%20highlighted%20light%20red.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1589666%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOffice%20365%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1589705%22%20slang%3D%22en-US%22%3ERe%3A%20Conditional%20Formatting%20to%20Highlight%20Cells%20Based%20on%20Yes%2FNo%20Values%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1589705%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F760063%22%20target%3D%22_blank%22%3E%40Gabz_122%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAll%20you%20need%20is%2C%20select%20the%20range%20in%20column%20A%3AG%20say%20A2%3AG100%20and%20make%20two%20New%20Rules%20for%20conditional%20formatting%20using%20the%20formulas%20given%20below.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3EFor%20Yes%20(Green)%3A%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-applescript%22%3E%3CCODE%3E%3D%24F2%3D%22Yes%22%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Eand%20set%20the%20format%20as%20per%20your%20choice.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3EFor%20No%20(Red)%3A%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-applescript%22%3E%3CCODE%3E%3D%24F2%3D%22No%22%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Eand%20set%20the%20format%20as%20per%20your%20choice.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIn%20the%20attached%20I%20selected%20the%20range%20A2%3AG100%20and%20make%20two%20New%20Rules%20for%20conditional%20formatting%20using%20the%20above%20formulas.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPlease%20refer%20to%20the%20attached%20for%20more%20details.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1589892%22%20slang%3D%22en-US%22%3ERe%3A%20Conditional%20Formatting%20to%20Highlight%20Cells%20Based%20on%20Yes%2FNo%20Values%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1589892%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F760063%22%20target%3D%22_blank%22%3E%40Gabz_122%3C%2FA%3E%26nbsp%3B%20just%20a%20little%20to%20explain%20how%20custom%20formulas%20in%20conditional%20formatting%20work%20and%20what%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F394231%22%20target%3D%22_blank%22%3E%40Subodh_Tiwari_sktneer%3C%2FA%3E%26nbsp%3B%20did.%26nbsp%3B%20A%20conditional%20formatting%20will%20apply%20the%20requested%20format%20to%20any%20cell%20that%20evaluates%20as%20%22True%22%20(which%20is%20anything%20except%20False%20or%200).%26nbsp%3B%20When%20you%20create%20the%20formula%20you%20need%20to%20create%20the%20cell%20reference(s)%20in%20the%20formula%20based%20on%20the%201st%20upper%20left%20cell%20in%20the%20range(s)%20that%20you%20select.%26nbsp%3B%20So%20in%20Subodh's%20example%20that%20is%20A2.%26nbsp%3B%20Since%20you%20want%20to%20use%20column%20F%20you%20use%20%24F2%20because%20the%20%24F%20will%20%22Fix%22%20that%20reference%20to%20always%20be%20column%20F%20and%20the%202%20(without%20a%20leading%20%24)%20will%20adjust%20the%20row%20for%20every%20cell%20the%20condition%20formatting%20looks%20at%20(in%20this%20case%20to%20be%20the%20same%20row%20as%20the%20cell%20being%20evaluated%20since%20the%20upper%20left%20cell%20A2%20and%20%24F2%20are%20both%20in%20row%202).%26nbsp%3B%20So%20as%20the%20conditional%20formatting%20goes%20cell%20to%20cell%20it%20will%20always%20look%20to%20compare%20the%20value%20in%20column%20F%20of%20the%20same%20row%20to%20determine%20if%20it%20evaluates%20True%20or%20False.%3C%2FP%3E%3CP%3EI%20hope%20that%20helps%20you%20understand%20conditional%20formatting%20rules.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1590061%22%20slang%3D%22en-US%22%3ERe%3A%20Conditional%20Formatting%20to%20Highlight%20Cells%20Based%20on%20Yes%2FNo%20Values%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1590061%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F570951%22%20target%3D%22_blank%22%3E%40mtarler%3C%2FA%3E%26nbsp%3BThank%20you%20so%20much%20for%20your%20response.%26nbsp%3B%20Your%20explanation%20helped%20me%20understand%20the%20way%20these%20formulae%20work%20so%20I%20can%20do%20similar%20things%20with%20other%20spreadsheets.%26nbsp%3B%20Thank%20you%20again!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1590059%22%20slang%3D%22en-US%22%3ERe%3A%20Conditional%20Formatting%20to%20Highlight%20Cells%20Based%20on%20Yes%2FNo%20Values%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1590059%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F394231%22%20target%3D%22_blank%22%3E%40Subodh_Tiwari_sktneer%3C%2FA%3E%26nbsp%3BThank%20you%20for%20answering%20with%20that%20very%20simple%20solution!%26nbsp%3B%20I%20tried%20to%20do%20it%20without%20selecting%20the%20whole%20range%20the%20document%20will%20be%20using%20and%20it%20didn't%20work%20so%20I%20selected%20the%20range%20of%20cells%20to%20be%20included%20in%20the%20document%20and%20plugged%20in%20the%20formulae%20and%20it%20worked%20perfectly.%26nbsp%3B%20Thank%20you%20again!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1590260%22%20slang%3D%22en-US%22%3ERe%3A%20Conditional%20Formatting%20to%20Highlight%20Cells%20Based%20on%20Yes%2FNo%20Values%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1590260%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F760063%22%20target%3D%22_blank%22%3E%40Gabz_122%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYou're%20welcome!%20Glad%20it%20worked%20as%20desired.%3C%2FP%3E%3CP%3EPlease%20take%20a%20minute%20to%20accept%20the%20post%20with%20the%20solution%20provided%20as%20a%20Best%20Response%20to%20mark%20your%20question%20as%20Solved.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
New Contributor

In the work I am doing, I'm finding that having spreadsheets to manage specific data and responses to forms, both for analysis of frequent responses and tally of yes/no responses on forms, is exceptionally helpful.  What I struggle with, being a not-to-savvy user of Excel, is how to conditionally format a row of cells based on the yes/no value of a single cell on that row.  The file below is the spread I am attempting to develop and having lines highlighted depending on the response of yes or no will make further use of and analysis of the data more efficient for us.  I've attempted to use (and edit for response values) the formulas and make them from scratch but I seem to be missing something in the process.  To specify what I want for a reaction to "Yes" is a row that is highlighted light green and for "No", a row that is highlighted light red.  

5 Replies
Highlighted

@Gabz_122 

All you need is, select the range in column A:G say A2:G100 and make two New Rules for conditional formatting using the formulas given below.

 

For Yes (Green):

 

=$F2="Yes"

 

and set the format as per your choice.

 

For No (Red):

 

=$F2="No"

 

and set the format as per your choice.

 

In the attached I selected the range A2:G100 and make two New Rules for conditional formatting using the above formulas.

 

Please refer to the attached for more details.

 

Highlighted

@Gabz_122  just a little to explain how custom formulas in conditional formatting work and what @Subodh_Tiwari_sktneer  did.  A conditional formatting will apply the requested format to any cell that evaluates as "True" (which is anything except False or 0).  When you create the formula you need to create the cell reference(s) in the formula based on the 1st upper left cell in the range(s) that you select.  So in Subodh's example that is A2.  Since you want to use column F you use $F2 because the $F will "Fix" that reference to always be column F and the 2 (without a leading $) will adjust the row for every cell the condition formatting looks at (in this case to be the same row as the cell being evaluated since the upper left cell A2 and $F2 are both in row 2).  So as the conditional formatting goes cell to cell it will always look to compare the value in column F of the same row to determine if it evaluates True or False.

I hope that helps you understand conditional formatting rules.

Highlighted

@Subodh_Tiwari_sktneer Thank you for answering with that very simple solution!  I tried to do it without selecting the whole range the document will be using and it didn't work so I selected the range of cells to be included in the document and plugged in the formulae and it worked perfectly.  Thank you again!

Highlighted

@mtarler Thank you so much for your response.  Your explanation helped me understand the way these formulae work so I can do similar things with other spreadsheets.  Thank you again!

Highlighted

@Gabz_122 

You're welcome! Glad it worked as desired.

Please take a minute to accept the post with the solution provided as a Best Response to mark your question as Solved.