Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 I have tried my best to explain the issue, thanking all in anticipation |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
One way ..
Assuming source data in cols A to D, from row2 down Put in E2: =IF(SUMPRODUCT(--ISNUMBER(MATCH(A2:D2,{"Severe";"Moderate";"Mild"}, 0)))0,"Yes",IF(COUNTIF(A2:D2,"Normal")=4,"No",IF( COUNTIF(A2:D2,"n/a")+COUNTIF(A2:D2,"n/d")=4,"n/a",""))) Copy down -- Max Singapore http://savefile.com/projects/236895 xdemechanik --- "Omer" wrote: 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 I have tried my best to explain the issue, thanking all in anticipation |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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")) Of course, the COUNTIF function can shorten this up a little bit... =IF(COUNTIF(A1:D1,UPPER("normal"))=4,"No",IF(COUNT IF(A1:D1,UPPER("n/?"))=0,"Yes","N/A")) Same conditions as described above still apply. Rick |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I think, due to small space, columns were distorted, let me rewrite the
columns, as none of the above formulas is doing good for me, but any ways thanks for your help guys 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 MILD 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 THanking you "Omer" wrote: 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 I have tried my best to explain the issue, thanking all in anticipation |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
=IF(SUMPRODUCT(--ISNUMBER(MATCH(A7:D7,{"Severe";"Moderate";"Mild"}, 0)))0,"Yes",IF(COUNTIF(A7:D7,"Normal")=4,"NO",IF( COUNTIF(A7:D7,"n/a")+COUNTIF(A7:D7,"n/d")=4,"n/a","")))
This one is working great, but when all 4 columns i.e from "A" to "D" are "normal, E becomes empty, and I want to have "NO" in "e" |
#7
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
This one is working great, but when all 4 columns i.e from "A" to "D" are
"normal", E becomes empty, and I want to have "NO" in "e" um, it should work as advertised. I've just re-tested it here. Maybe re-check the data indications in cols A to D (typos?, white spaces?). If there could be white spaces (leading or trailing spaces before/after "Normal"), just replace the part: COUNTIF(A7:D7,"Normal")=4 with: COUNTIF(A7:D7,"*Normal*")=4 in the formula -- Max Singapore http://savefile.com/projects/236895 xdemechanik --- "Omer" wrote: =IF(SUMPRODUCT(--ISNUMBER(MATCH(A7:D7,{"Severe";"Moderate";"Mild"}, 0)))0,"Yes",IF(COUNTIF(A7:D7,"Normal")=4,"NO",IF( COUNTIF(A7:D7,"n/a")+COUNTIF(A7:D7,"n/d")=4,"n/a",""))) This one is working great, but when all 4 columns i.e from "A" to "D" are "normal, E becomes empty, and I want to have "NO" in "e" |
#8
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I think, due to small space, columns were distorted, let me rewrite the
columns, as none of the above formulas is doing good for me, but any ways thanks for your help guys 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 MILD 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 What did you want it to show if there were only a mixture of "NORMAL"s and "N/A"s? Rick |
#9
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thanks max you are just awesome
just one more thing, now every thing is going just great except if COLUMNS, "A","B","C" have "NORMAL" and "D" contain "n/a", "E" is showing blank, in all other cases this formula is giving me corrrect answer. I have checked by their are no spaces infront or behind "n/a" Thanking you once again |
#10
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
if COLUMNS "A","B","C" have "NORMAL"
and "D" contain "n/a", "E" is showing blank Yes, that's right, simply because the return for the above scenario wasn't specified earlier by you. Supposing a return of: zzz (instead of blank) for the above scenario is desired, you could bolt-on an additional IF condition to take care of it, viz: IF(AND(COUNTIF(A7:C7,"*Normal*")=3,TRIM(D7)="n/a"),"zzz", .... Implemented into the formula, it would now be: =IF(SUMPRODUCT(--ISNUMBER(MATCH(A7:D7,{"Severe";"Moderate";"Mild"}, 0)))0,"Yes",IF(COUNTIF(A7:D7,"*Normal*")=4,"No",I F(COUNTIF(A7:D7,"n/a")+COUNTIF(A7:D7,"n/d")=4,"n/a",IF(AND(COUNTIF(A7:C7,"*Normal*")=3,TRIM(D7)= "n/a"),"zzz","")))) Adapt the return "zzz" to suit -- Max Singapore http://savefile.com/projects/236895 xdemechanik --- "Omer" wrote in message ... Thanks max you are just awesome just one more thing, now every thing is going just great except if COLUMNS, "A","B","C" have "NORMAL" and "D" contain "n/a", "E" is showing blank, in all other cases this formula is giving me corrrect answer. I have checked by their are no spaces infront or behind "n/a" Thanking you once again |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
HELP on "left","right","find","len","substitute" functions | Excel Discussion (Misc queries) | |||
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next | New Users to Excel | |||
create links to check boxes marked "good" fair"and "bad" | Excel Worksheet Functions | |||
Complex if test program possible? If "value" "value", paste "value" in another cell? | Excel Discussion (Misc queries) | |||
Insert "-" in text "1234567890" to have a output like this"123-456-7890" | Excel Discussion (Misc queries) |