Complex evaluation

sandramac
sandramac used Ask the Experts™
on
Hello, trying to devise the best way to handle this

Need a way to color fill a cell and add text based on this criteria

If sheet2!U6 or U7 or U8 or U9>35  
or if sheet2!e6 or e7 or e8 or e9 has "TS" anywhere in that cell, (there will be other data in the cell along with possibility of TS in it.)
or if sheet2!o6 or o7 or o8 or o9 is greater than 115 or less then 10, then return with backcolor of cell to Red in addition if U6/U7/U8/U9 was >35 then place "W" in that cell, if TS was in e6/e7/e8/e9 then place "Z" in that cell, if o6/o7/o8/o9 was >115 or <10, then place "T" in that cell.  If all three criteria is found then the cell would be backcolor Red, with W Z T  in that cell.

If sheet2!U6 or U7 or U8 or U9>25  
or if sheet2!e6 or e7 or e8 or e9 has "SN" anywhere in that cell, (there will be other data in the cell along with possibility of SN in it.)
or if sheet2!e6 or e7 or e8 or e9 has "FZ" anywhere in that cell, (there will be other data in the cell along with possibility of FZ in it.)
or if sheet2!o6 or o7 or o8 or o9 is greater than 100 or less then 20, then return with backcolor of cell to Yellow in addition if U6/U7/U8/U9 was >25 then place "W" in that cell, if SN was in e6/e7/e8/e9 then place "S" in that cell, if FZ was in e6/e7/e8/e9 then place "I" in that cell if o6/o7/o8/o9 was >100 or <20, then place "T" in that cell.  If all  criteria is found then the cell would be backcolor Yellow, with W S I T  in that cell.
else the cell backfill is blank and green.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
byundtMechanical Engineer
Most Valuable Expert 2013
Top Expert 2013

Commented:
Formula for value of first cell:
=IF(COUNTIF(U6:U9,">35"),"W","") & IF(COUNTIF(E6:E9,"*TS*"),"Z","") & IF(OR(COUNTIF(O6:O9,">115"),COUNTIF(O6:O9,"<10")),"T","")

Conditional Formatting for red color in that cell
=AND(H2<>"",SEARCH(H2,"WZT")>0)          'Assumes cell is H2

Formula for value of cell:
=IF(COUNTIF(U6:U9,">25"),"W","") & IF(COUNTIF(E6:E9,"*SN*"),"S","") & IF(COUNTIF(E6:E9,"*FZ*"),"I","") & IF(OR(COUNTIF(O6:O9,">100"),COUNTIF(O6:O9,"<20")),"T","")

Conditional formatting for yellow color:
=AND(H4<>"",SEARCH(H4,"WSIT")>0)

Author

Commented:
How would I be able to combine both formulas into the one cell so it is evaluating first for Red, then if nothing meets red, then evaluate for yellow (2nd Formula)
byundtMechanical Engineer
Most Valuable Expert 2013
Top Expert 2013

Commented:
Formula for Conditional Formatting red color:
=OR(COUNTIF(U6:U9,">35"),COUNTIF(E6:E9,"*TS*"),COUNTIF(O6:O9,">115"),COUNTIF(O6:O9,"<10"))

Formula for Conditional Formatting yellow color:
=OR(COUNTIF(U6:U9,">25"),COUNTIF(E6:E9,"*SN*"),COUNTIF(E6:E9,"*FZ*"),COUNTIF(O6:O9,">100"),COUNTIF(O6:O9,"<20"))

Author

Commented:
Sorry byundt for not being clear on the task.

I am trying to combine both if statements

=IF(COUNTIF(U6:U9,">35"),"W","") & IF(COUNTIF(E6:E9,"*TS*"),"Z","") & IF(OR(COUNTIF(O6:O9,">115"),COUNTIF(O6:O9,"<10")),"T","") and =IF(COUNTIF(U6:U9,">25"),"W","") & IF(COUNTIF(E6:E9,"*SN*"),"S","") & IF(COUNTIF(E6:E9,"*FZ*"),"I","") & IF(OR(COUNTIF(O6:O9,">100"),COUNTIF(O6:O9,"<20")),"T","")
Mechanical Engineer
Most Valuable Expert 2013
Top Expert 2013
Commented:
Sorry. My misunderstanding.

Since several of the conditions overlap for the same response, you can choose the more liberal of the criteria:
=IF(COUNTIF(U6:U9,">25"),"W","") & IF(COUNTIF(E6:E9,"*TS*"),"Z","") & IF(OR(COUNTIF(O6:O9,">100"),COUNTIF(O6:O9,"<20")),"T","") & IF(COUNTIF(E6:E9,"*SN*"),"S","") & IF(COUNTIF(E6:E9,"*FZ*"),"I","")

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial