View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Rick Rothstein \(MVP - VB\) Rick Rothstein \(MVP - VB\) is offline
external usenet poster
 
Posts: 2,202
Default how to use "IF" here

It is difficult for me, but I hope not for you peopl, I want to make
column
"E" in my work book such that

if cells in column ""A"," B", "C", "D" have "severe" or "moderate" or
"mild", corresponding cell in column "E" should show "Yes"

but ifF Column "A", "B"," C", "D " ALL have "normal", corresponding cell
in
"E" should show "NO"

AND IF COLUMNS "A", "B", "C", "D" all have "n/a", "n/d", E should show
"n/a"

In this example,

A B C
D E
MILD NORMAL NORMAL NORMAL
YES
SEVERE MODERATE MILD MILD
YES
n/a n/a n/a n/a
n/a
n/a n/d n/d
n/a n/a
severe n/a n/a n/d
Yes


This is a top of the head answer, so it may not be the best solution for you
(meaning, check back here for other answers later today). The formula
requires that the cells are filled with what you show... it will fail if you
misspell "NORMAL"; it will succeed if you use words other than MILD,
MODERATE or SEVERE; and any character can follow the N/ and it will act like
N/A or N/D. You can use any combination of upper and lower case letters
though.

=IF(LEN(SUBSTITUTE(UPPER(A1&B1&C1&D1),"NORMAL","") )=0,"No",IF(ISERR(FIND("N/",UPPER(A1&B1&C1&D1))),"Yes","N/A"))

Rick