SOLVED
Home

Conditional Formatting

%3CLINGO-SUB%20id%3D%22lingo-sub-319403%22%20slang%3D%22en-US%22%3EConditional%20Formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-319403%22%20slang%3D%22en-US%22%3E%3CP%3ECan%20anyone%20do%20some%20conditional%20formatting%20on%20the%20attached%20document...%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20need%20expired%20dates%20to%20turn%20red%2C%20any%20dates%20within%2030%20days%20to%20turn%20yellow%2C%20and%20all%20other%20dates%20to%20turn%20green.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20tried%20doing%20it%20but%20there%20are%20a%20few%20cells%20where%20it%20isn't%20working.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-319403%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-328587%22%20slang%3D%22en-US%22%3ERe%3A%20Conditional%20Formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-328587%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20MJS-B%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIt%20can%20be%20a%20little%20tricky.%26nbsp%3B%20See%20the%20attached%20file%20which%20should%20help%20you%20understand%20it%20a%20little%20better.%3C%2FP%3E%3CP%3EIt%20comes%20down%20to%20a%20combination%20of%20the%20tests%2C%20order%20and%20your%20rules.%20%26nbsp%3B%20There%20is%20also%20a%20little%20check%20box%20that%20you%20need%20to%20select.%20%26nbsp%3B%20I%20pulled%20the%20test%20out%20into%20separate%20cells%20(so%20it's%20easier%20to%20understand)%20but%20there's%20no%20reason%20they%20couldn't%20be%20inserted%20into%20the%20main%20Conditional%20Formatting%20formula%20once%20you%20understand%20what%20I've%20don.%26nbsp%3B%20Of%20course%2C%20you%20don't%20have%20to%20combine%20it.%26nbsp%3B%20The%20thing%20you'll%20need%20to%20adjust%20are%20the%20rules%20eg%20%26gt%3B%20Date%20or%20%26gt%3B%3D%20Date%20etc.%26nbsp%3B%20and%20the%20columns%20eg%20I've%20chosen%20column%20%22F%22%20and%20yours%20may%20be%20different.%26nbsp%3B%20Finally%2C%20remember%20to%20lock%20the%20relevant%20columns%2C%20rows%20by%20using%20the%20%24%20symbol.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CLI-EMOJI%20id%3D%22lia_winking-face%22%20title%3D%22%3Awinking_face%3A%22%3E%3C%2FLI-EMOJI%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-328562%22%20slang%3D%22en-US%22%3ERe%3A%20Conditional%20Formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-328562%22%20slang%3D%22en-US%22%3E%3CP%3EThanks%20for%20responding%20so%20quickly.%26nbsp%3B%20Your%20answer%20to%20my%20second%20question%20is%20what%20I%20thought%20I%20would%20have%20to%20do.%26nbsp%3B%20I'll%20have%20to%20give%20that%20one%20more%20thought.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EOn%20the%20first%20question%2C%20to%20ensure%20I%20understand%20what%20you%20are%20saying%2C%20I%20have%20two%20rules.%26nbsp%3B%20One%20rule%20results%20in%20changing%20the%20color%20of%20a%20cell%20to%20one%20color%20(essentially%20if%20the%20first%20cell%20in%20a%20row%20has%20any%20value%20then%20the%20cell%20color%20of%20another%20cell%20turns%2C%20say%2C%20blue).%26nbsp%3B%20The%20other%20results%20in%20changing%20the%20color%20of%20a%20cell%20to%20a%20different%20color%2C%20red.%26nbsp%3B%20The%20second%20rule%20would%20only%20be%20true%20under%20more%20restricted%20conditions.%26nbsp%3B%20So...the%20first%20rule%20turns%20the%20cell%20color%20blue%20when%20a%20user%20puts%20a%20value%20in%20the%20first%20cell%20of%20the%20row%20and%20only%20if%20the%20second%20rule%20happens%20to%20be%20true%20will%20that%20cell%20then%20change%20to%20red.%26nbsp%3B%20Tested%20independently%20both%20rules%20work.%26nbsp%3B%20I%20%22thought%22%20that%20if%20I%20change%20the%20order%20in%20which%20the%20rules%20executed%20(Manage%20Rules%20then%20move%20the%20second%20rule%20for%20execution%20after%20the%20first%20rule)%20but%20it%20seems%20that%20this%20doesn't%20work%20and%20honestly%2C%20not%20having%20to%20worry%20about%20rules%20that%20compete%20with%20one%20another%2C%20I%20didn't%20know%20if%20this%20would%20work.%26nbsp%3B%20The%20second%20rule%20returns%20false%20based%20on%20testing%20some%20dates%20in%20the%20worksheet%20such%20as%20if%20today's%20date%20is%20after%20a%20date%20indicated%20as%20a%20header%20above%20a%20series%20of%20columns%20and%20the%20cell%20has%20no%20value%20then%20the%20cell%20turns%20red.%26nbsp%3B%20So%20the%20notion%20was%20the%20first%20rule%20would%20execute%20and%20turn%20the%20cell%20blue%20as%20soon%20as%20a%20value%20is%20put%20in%20the%20cell%20in%20column%20A.%26nbsp%3B%20Then%20if%20the%20second%20condition%20returns%20true%2C%20the%20cell%20would%20turn%20red.%26nbsp%3B%20What%20I%20think%20may%20be%20happening%20is%20once%20the%20first%20rule%20changes%20the%20cell%20color%20to%20blue%2C%20the%20second%20rule%20can't%20seem%20to%20turn%20the%20blue%20cell%20red.%26nbsp%3B%20The%20reason%20I%20think%20this%20may%20be%20the%20case%20is%20because%20if%20I%20leave%20the%20first%20rule%20active%20(removing%20the%20second)%2C%20the%20cell%20turns%20blue%20after%20I%20enter%20something%20in%20column%20A%2C%20and%20I%20then%20manually%20change%20the%20format%20of%20the%20cell%20to%20change%20the%20color%20to%20red%2C%20the%20color%20will%20not%20change%20to%20red.%26nbsp%3B%20Is%20there%20a%20way%20to%20get%20around%20this%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-326469%22%20slang%3D%22en-US%22%3ERe%3A%20Conditional%20Formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-326469%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%20Your%20first%20question%20isn't%20easy%20to%20answer%20without%20seeing%20your%20equations%20however%2C%20I'm%20guessing%20your%20formulas%20(although%20working%20individually)%20don't%20make%20sense%20together.%26nbsp%3B%20For%20example%2C%20if%20you%20have%20A1%3D3%2C%20B1%3D1%20and%20C1%3D2%20then%20the%20Conditional%20Formulas%20written%20separately%20would%20work...%3C%2FP%3E%3CP%3EIF%20A1%20%26gt%3B%20B1%20then%20BLUE%20(%26amp%3B)%20IF%20A1%20%26gt%3B%20C1%20then%20RED.%20%26nbsp%3B%20However%2C%20put%20together%2C%20they%20wouldn't%20work%20if%20you%20had%20them%20as...%3C%2FP%3E%3CP%3EIF%20A1%20%26gt%3B%20B1%20then%20BLUE%20followed%20by%20IF%20A1%20%26gt%3B%20C1%20then%20RED.%26nbsp%3B%20That's%20because%20the%20first%20criteria%20has%20been%20met.%26nbsp%3B%20You%20would%20need%20to%20change%20the%20order%20of%20the%20formulas%20to%20make%20sense...%3C%2FP%3E%3CP%3EIF%20A1%20%26gt%3B%20C1%20then%20RED%20followed%20by%20IF%20A1%20%26gt%3B%20B1%20then%20BLUE.%20%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAs%20for%20your%20second%20question.%26nbsp%3B%20The%20easiest%20way%20to%20extend%20your%20formulas%20and%20formatting%20down%20-automatically%2C%20when%20someone%20adds%20a%20new%20row-%20is%20by%20changing%20your%20area%20into%20a%20TABLE%20(see%20attached%20picture).%26nbsp%3B%20The%20only%20other%20way%2C%20without%20using%20VBA%2C%20is%20to%20nest%20(wrap)%20your%20formula%20inside%20an%20equation%20that%20gives%20a%20blank%20result%20unless%20someone%20enters%20data%20onto%20that%20row.%20%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFor%20example%2C%20say%20your%20table%20is%20only%20down%20to%2020%20rows%2C%20then%20you%20could%20put%20your%20formula%20inside%20something%20like...%26nbsp%3B%20%3DIF(A1%3D%22%22%2C%22%22%2C%5Byour%20formula%20goes%20here%5D)%20and%20copy%20it%20down%20to%20say%20row%20100.%26nbsp%3B%20That%20way%2C%20if%20column%20A%20row%2021%20is%20empty%20then%20the%20formula%20would%20result%20in%20a%20blank%20result.%26nbsp%3B%20As%20soon%20as%20information%20is%20placed%20in%20the%20relevant%20columns%20in%20row%2021%2C%20then%20the%20formula%20would%20give%20a%20result.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHope%20that%20helps.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-326007%22%20slang%3D%22en-US%22%3ERe%3A%20Conditional%20Formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-326007%22%20slang%3D%22en-US%22%3E%3CP%3EI%20have%20a%20similar%20problem%20I%20think.%26nbsp%3B%20Ultimately%2C%20I%20want%20a%20cell%20to%20be%20yellow%20UNLESS%20a%20set%20of%20complex%20conditions%20occur%20(complex%20in%20how%20I%20have%20to%20strip%20out%20certain%20data%20from%20one%20column%20and%20compare%20to%20data%20in%20another%20column).%26nbsp%3B%20I%20initially%20used%20conditional%20formatting%20looking%20for%20some%20data%20in%20a%20row%20to%20apply%20simple%20formatting%20(border%2C%20yellow%20fill).%26nbsp%3B%20Then%20I%20added%20another%20rule%20with%20the%20complex%20conditions%20above%20hoping%20that%20it%20would%20override%20the%20yellow%20fill%20with%20the%20red%20fill.%26nbsp%3B%20I%20played%20with%20adjusting%20the%20order%20in%20which%20the%20rules%20would%20run%20but%20that%20does%20not%20seem%20to%20have%20any%20effect.%26nbsp%3B%20Each%20rule%20works%20(tested)%20but%20the%20rule%20I%20added%20last%20will%20not%20override%20the%20first%20rule.%26nbsp%3B%20In%20other%20words%2C%20once%20the%20rule%20to%20apply%20the%20yellow%20fill%2C%20the%20rule%20that%20conducts%20the%20additional%20testing%20will%20not%20then%20change%20the%20fill%20to%20red.%26nbsp%3B%20So%20the%20complex%20rule%20also%20checks%20for%20some%20data%20in%20a%20row%2C%20then%20further%20evaluates%20data%20in%20a%20particular%20column%20in%20the%20row%20(does%20some%20date%20comparisons%20which%20determines%20if%20the%20current%20date%20is%2030%20days%20after%20a%20date%20pulled%20from%20another%20cell%20AND%20there%20is%20no%20currency%20data%20yet%20provided%20in%20that%20cell).%26nbsp%3B%20This%20rule%20needs%20to%20be%20applied%20to%20every%20row%20in%20the%20worksheet%20(applied%20to%20multiple%20columns).%26nbsp%3B%20Although%20I%20haven't%20yet%20added%20an%20additional%20criteria%20since%20I%20have%20to%20confirm%20the%20business%20rule%20that%20would%20trigger%20the%20condition%2C%20but%20there%20will%20have%20to%20be%20a%20trigger%20in%20a%20(different)%20cell%20that%20checks%20the%20same%20thing%20but%20ALSO%20checks%20to%20see%20if%20a%20particular%20value%20has%20been%20entered%20in%20that%20cell.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EKeep%20in%20mind%20this%20is%20a%20spreadsheet%20used%20by%20users%20that%20are%20not%20Excel%20%22experts%22%20and%20I%20do%20try%20to%20use%20the%20simplest%20method%20of%20achieving%20something%20(to%20try%20to%20prevent%20someone%20from%20deleting%20data%2C%20a%20column%2C%20using%20an%20invalid%20value%20that%20is%20being%20tested%2C%20etc.).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhat%20are%20my%20options%3F%26nbsp%3B%20I%20know%20I%20could%20do%20this%20easily%20in%20VB%20but%20the%20owner%20of%20the%20spreadsheet%20would%20not%20be%20comfortable%20owning%20a%20spreadsheet%20with%20VB%20in%20it.%26nbsp%3B%20Also%2C%20I%20work%20for%20the%20government%20and%20I%20do%20run%20into%20security%20issues%20trying%20to%20implement%20VB%20even%20though%20it%20would%20not%20be%20used%20outside%20my%20team%20(theoretically).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESame%20spreadsheet%2C%20different%20question.%26nbsp%3B%20Is%20there%20a%20%22simple%22%20way%20to%20dynamically%20add%20a%20formula%20to%20a%20column%20in%20a%20row%20when%20data%20is%20added%20to%20a%20different%20column%20(without%20manually%20copying%20the%20formula%20to%20the%20target%20column%20in%20the%20new%20row)%3F%26nbsp%3B%20Again%2C%20I%20could%20do%20this%20with%20VB%20but%20same%20concern%20as%20above.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-320058%22%20slang%3D%22en-US%22%3ERe%3A%20Conditional%20Formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-320058%22%20slang%3D%22en-US%22%3E%3CP%3ENo%20problem%2C%20it's%20much%20easier%20to%20fix%20when%20the%20actual%20file%20(or%20example%20file)%26nbsp%3B%20is%20included.%3C%2FP%3E%3CP%3E%3CLI-EMOJI%20id%3D%22lia_winking-face%22%20title%3D%22%3Awinking_face%3A%22%3E%3C%2FLI-EMOJI%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-320055%22%20slang%3D%22en-US%22%3ERe%3A%20Conditional%20Formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-320055%22%20slang%3D%22en-US%22%3E%3CP%3EYou%20are%20a%20legend!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20for%20your%20help.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-320050%22%20slang%3D%22en-US%22%3ERe%3A%20Conditional%20Formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-320050%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%20I%20have%20changed%20it%20so%20that%20ALL%20records%20less%20than%20today%20(%2B%20optional%20n)%20shows%20as%20RED.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EKind%20regards%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-319975%22%20slang%3D%22en-US%22%3ERe%3A%20Conditional%20Formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-319975%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20for%20you%20help.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E1%20problem%20though%2C%20cells%20E6%20%26amp%3B%20E17%20should%20be%20red%20as%20they%20are%20out%20of%20date.%20They%20currently%20have%20no%20fill.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAny%20ideas%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-319531%22%20slang%3D%22en-US%22%3ERe%3A%20Conditional%20Formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-319531%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%26nbsp%3B%20Try%20the%20following%20(attached).%26nbsp%3B%3C%2FP%3E%3CP%3EI%20wasn't%20sure%20what%20column%20you%20wanted%20to%20check%20so%20I%20added%20an%20additional%20row%20so%20you%20could%20switch%20checking%20for%20any%20column%20On%2FOff!%26nbsp%3B%20The%20box%20on%20the%20right%20controls%20when%20the%20records%20will%20be%20shown%20in%20Red%2C%20Amber%20or%20Green.%3C%2FP%3E%3CP%3EThe%20text%20in%20the%20Red%2C%20Amber%20and%20Green%20are%20for%20info%2C%20you%20can%20change%20the%20text%20to%20whatever%20you%20want.%26nbsp%3B%20It's%20the%20Yellow%20Boxes%20that%20are%20important.%20%26nbsp%3B%3C%2FP%3E%3CP%3ENot%20sure%20if%20the%20date%20in%20G15%20should%20be%2001%2F06%2F2098%20so%20I've%20marked%20it%20for%20you%20to%20check.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHope%20this%20helps.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-804757%22%20slang%3D%22en-US%22%3ERe%3A%20Conditional%20Formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-804757%22%20slang%3D%22en-US%22%3E%3CP%3EI%20was%20hoping%20you%20could%20assist%20me%20with%20a%20similar%20problem%3F%20My%20spread%20sheet%20has%20membership%20dates%20in%20one%20column%20and%20expiry%20dates%20in%20the%20adjoining%2C%20I%20had%20it%20set%20up%20so%20if%20the%20exoiry%20dates%20were%20exceeded%2C%20the%20cells%20high%20lighted%20with%20a%20red%20fill.%20This%20no%20longer%20seems%20to%20be%20working%2C%20could%20you%20help%20me%20please%3F%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F266754%22%20target%3D%22_blank%22%3E%40Nauthstar%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-804796%22%20slang%3D%22en-US%22%3ERe%3A%20Conditional%20Formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-804796%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F392260%22%20target%3D%22_blank%22%3E%40johnc47%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThat's%20a%20separate%20topic%2C%20better%20if%20you%20start%20new%20conversation.%3C%2FP%3E%0A%3CP%3EAs%20for%20the%20file%2C%20you%20highlight%20dates%20which%20are%20in%20this%20and%20previous%20months%20(Aug%20and%20Jul)%20of%20the%20current%20year%20-%20there%20are%20no%20such%20dates.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-804839%22%20slang%3D%22en-US%22%3ERe%3A%20Conditional%20Formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-804839%22%20slang%3D%22en-US%22%3EApologies%2C%20I%20am%20new%20to%20the%20community%20thing.%20How%20do%20I%20start%20a%20new%20conversation%3F%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-804885%22%20slang%3D%22en-US%22%3ERe%3A%20Conditional%20Formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-804885%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F392260%22%20target%3D%22_blank%22%3E%40johnc47%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EPlease%20go%20here%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2FExcel%2Fbd-p%2FExcelGeneral%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2FExcel%2Fbd-p%2FExcelGeneral%3C%2FA%3Eand%20click%20on%20Start%20new%20conversation%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-805321%22%20slang%3D%22en-US%22%3ERe%3A%20Conditional%20Formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-805321%22%20slang%3D%22en-US%22%3Edone%2C%20thank%20you.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-806900%22%20slang%3D%22en-US%22%3ERe%3A%20Conditional%20Formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-806900%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F392260%22%20target%3D%22_blank%22%3E%40johnc47%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EI%20don't%20think%20there%20was%20anything%20really%20wrong%20with%20your%20spreadsheet.%3C%2FSPAN%3E%26nbsp%3B%20The%20conditional%20formatting%20was%20not%20showing%20because%20you%20had%20updated%20the%20memberships%20with%20new%20dates%20for%20this%20year.%20%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20however%20made%20a%20few%20adjustments.%26nbsp%3B%20I've%20made%20your%20list%20a%20table%20so%20you%20won't%20need%20to%20update%20formulas%20when%20you%20add%20a%20new%20person%20to%20the%20bottom%20-%20all%20the%20conditional%20formatting%20will%20also%20coy%20down.%20%26nbsp%3B%3C%2FP%3E%3CP%3EI've%20modified%20the%20print%20so%20that%20the%20header%20appears%20on%20every%20printed%20page%20and%20I've%20also%20added%20a%20column%20which%20tells%20you%20the%20Student's%20age.%20%26nbsp%3B%3C%2FP%3E%3CP%3EAt%20the%20top%20I've%20also%20included%20a%20couple%20of%20equations%20to%20tell%20you%20how%20many%20students%20you%20have%20and%20their%20average%20age.%26nbsp%3B%20These%20rows%20along%20with%20the%20bubbles%20can%20be%20deleted%20without%20it%20affecting%20your%20print%20range.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHope%20this%20helps%20and%20good%20luck%20with%20the%20classes.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EKind%20regards%3C%2FP%3E%3CP%3ENauthstar%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-808202%22%20slang%3D%22en-US%22%3ERe%3A%20Conditional%20Formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-808202%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F266754%22%20target%3D%22_blank%22%3E%40Nauthstar%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%20for%20your%20assistance%2C%20much%20appreciated.%3C%2FP%3E%3C%2FLINGO-BODY%3E
rswann97
New Contributor

Can anyone do some conditional formatting on the attached document...

 

I need expired dates to turn red, any dates within 30 days to turn yellow, and all other dates to turn green.

 

I have tried doing it but there are a few cells where it isn't working.

16 Replies

Hi,  Try the following (attached). 

I wasn't sure what column you wanted to check so I added an additional row so you could switch checking for any column On/Off!  The box on the right controls when the records will be shown in Red, Amber or Green.

The text in the Red, Amber and Green are for info, you can change the text to whatever you want.  It's the Yellow Boxes that are important.  

Not sure if the date in G15 should be 01/06/2098 so I've marked it for you to check.

 

Hope this helps.

 

 

Hi, 

 

Thanks for you help.

 

1 problem though, cells E6 & E17 should be red as they are out of date. They currently have no fill.

 

Any ideas?

Solution

Hi, I have changed it so that ALL records less than today (+ optional n) shows as RED.

 

Kind regards

You are a legend!

 

Thanks for your help.

No problem, it's much easier to fix when the actual file (or example file)  is included.

;-)

I have a similar problem I think.  Ultimately, I want a cell to be yellow UNLESS a set of complex conditions occur (complex in how I have to strip out certain data from one column and compare to data in another column).  I initially used conditional formatting looking for some data in a row to apply simple formatting (border, yellow fill).  Then I added another rule with the complex conditions above hoping that it would override the yellow fill with the red fill.  I played with adjusting the order in which the rules would run but that does not seem to have any effect.  Each rule works (tested) but the rule I added last will not override the first rule.  In other words, once the rule to apply the yellow fill, the rule that conducts the additional testing will not then change the fill to red.  So the complex rule also checks for some data in a row, then further evaluates data in a particular column in the row (does some date comparisons which determines if the current date is 30 days after a date pulled from another cell AND there is no currency data yet provided in that cell).  This rule needs to be applied to every row in the worksheet (applied to multiple columns).  Although I haven't yet added an additional criteria since I have to confirm the business rule that would trigger the condition, but there will have to be a trigger in a (different) cell that checks the same thing but ALSO checks to see if a particular value has been entered in that cell.

 

Keep in mind this is a spreadsheet used by users that are not Excel "experts" and I do try to use the simplest method of achieving something (to try to prevent someone from deleting data, a column, using an invalid value that is being tested, etc.).

 

What are my options?  I know I could do this easily in VB but the owner of the spreadsheet would not be comfortable owning a spreadsheet with VB in it.  Also, I work for the government and I do run into security issues trying to implement VB even though it would not be used outside my team (theoretically).

 

Same spreadsheet, different question.  Is there a "simple" way to dynamically add a formula to a column in a row when data is added to a different column (without manually copying the formula to the target column in the new row)?  Again, I could do this with VB but same concern as above.

Hi, Your first question isn't easy to answer without seeing your equations however, I'm guessing your formulas (although working individually) don't make sense together.  For example, if you have A1=3, B1=1 and C1=2 then the Conditional Formulas written separately would work...

IF A1 > B1 then BLUE (&) IF A1 > C1 then RED.   However, put together, they wouldn't work if you had them as...

IF A1 > B1 then BLUE followed by IF A1 > C1 then RED.  That's because the first criteria has been met.  You would need to change the order of the formulas to make sense...

IF A1 > C1 then RED followed by IF A1 > B1 then BLUE.  

 

As for your second question.  The easiest way to extend your formulas and formatting down -automatically, when someone adds a new row- is by changing your area into a TABLE (see attached picture).  The only other way, without using VBA, is to nest (wrap) your formula inside an equation that gives a blank result unless someone enters data onto that row.  

 

For example, say your table is only down to 20 rows, then you could put your formula inside something like...  =IF(A1="","",[your formula goes here]) and copy it down to say row 100.  That way, if column A row 21 is empty then the formula would result in a blank result.  As soon as information is placed in the relevant columns in row 21, then the formula would give a result.

 

Hope that helps.

Thanks for responding so quickly.  Your answer to my second question is what I thought I would have to do.  I'll have to give that one more thought.

 

On the first question, to ensure I understand what you are saying, I have two rules.  One rule results in changing the color of a cell to one color (essentially if the first cell in a row has any value then the cell color of another cell turns, say, blue).  The other results in changing the color of a cell to a different color, red.  The second rule would only be true under more restricted conditions.  So...the first rule turns the cell color blue when a user puts a value in the first cell of the row and only if the second rule happens to be true will that cell then change to red.  Tested independently both rules work.  I "thought" that if I change the order in which the rules executed (Manage Rules then move the second rule for execution after the first rule) but it seems that this doesn't work and honestly, not having to worry about rules that compete with one another, I didn't know if this would work.  The second rule returns false based on testing some dates in the worksheet such as if today's date is after a date indicated as a header above a series of columns and the cell has no value then the cell turns red.  So the notion was the first rule would execute and turn the cell blue as soon as a value is put in the cell in column A.  Then if the second condition returns true, the cell would turn red.  What I think may be happening is once the first rule changes the cell color to blue, the second rule can't seem to turn the blue cell red.  The reason I think this may be the case is because if I leave the first rule active (removing the second), the cell turns blue after I enter something in column A, and I then manually change the format of the cell to change the color to red, the color will not change to red.  Is there a way to get around this?

Hi MJS-B,

 

It can be a little tricky.  See the attached file which should help you understand it a little better.

It comes down to a combination of the tests, order and your rules.   There is also a little check box that you need to select.   I pulled the test out into separate cells (so it's easier to understand) but there's no reason they couldn't be inserted into the main Conditional Formatting formula once you understand what I've don.  Of course, you don't have to combine it.  The thing you'll need to adjust are the rules eg > Date or >= Date etc.  and the columns eg I've chosen column "F" and yours may be different.  Finally, remember to lock the relevant columns, rows by using the $ symbol.

 

;-)

I was hoping you could assist me with a similar problem? My spread sheet has membership dates in one column and expiry dates in the adjoining, I had it set up so if the exoiry dates were exceeded, the cells high lighted with a red fill. This no longer seems to be working, could you help me please? @Nauthstar 

@johnc47 

That's a separate topic, better if you start new conversation.

As for the file, you highlight dates which are in this and previous months (Aug and Jul) of the current year - there are no such dates.

Apologies, I am new to the community thing. How do I start a new conversation?

@johnc47 

Please go here https://techcommunity.microsoft.com/t5/Excel/bd-p/ExcelGeneral and click on Start new conversation

done, thank you.

Hi @johnc47 

 

I don't think there was anything really wrong with your spreadsheet.  The conditional formatting was not showing because you had updated the memberships with new dates for this year.   

 

I have however made a few adjustments.  I've made your list a table so you won't need to update formulas when you add a new person to the bottom - all the conditional formatting will also coy down.  

I've modified the print so that the header appears on every printed page and I've also added a column which tells you the Student's age.  

At the top I've also included a couple of equations to tell you how many students you have and their average age.  These rows along with the bubbles can be deleted without it affecting your print range.

 

Hope this helps and good luck with the classes.

 

Kind regards

Nauthstar

Hi @Nauthstar 

 

Thank you for your assistance, much appreciated.