Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Function to check list for specific conditions and return an answe
I have a list of five cells which may contain any one of the following
numbers 017, 030,0. In another cell i want to do the following: If all five cells only contain 017 or 0 then return a value of 017 If all five cells only contain 030 or 0 then return a value of 030 If all five cells contain a combination of all three numbers the cell to show "Check" -- tanya |
#2
|
|||
|
|||
Try this:
=IF(COUNTIF(A1:A5,"017")+COUNTIF(A1:A5,0)=5,"017", IF(COUNTIF(A1:A5,"030")+COUNTIF(A1:A5,0)=5,"030",I F(COUNTIF(A1:A5,"017")+COUNTIF(A1:A5,"030")+COUNTI F(A1:A5,0)=5,"Check","-"))) Ola |
#3
|
|||
|
|||
Hi Tanya,
I think this does it =IF(OR(COUNTIF(A1:A5,"017")=5,COUNTIF(A1:A5,"0")=5 ),"017",IF(COUNTIF(A1:A5," 030")=5,"030","Check")) -- HTH Bob Phillips "tanya" wrote in message ... I have a list of five cells which may contain any one of the following numbers 017, 030,0. In another cell i want to do the following: If all five cells only contain 017 or 0 then return a value of 017 If all five cells only contain 030 or 0 then return a value of 030 If all five cells contain a combination of all three numbers the cell to show "Check" -- tanya |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Recent File List Check Box Greyed out | Excel Discussion (Misc queries) | |||
need function to sum top ranking items in list | Excel Worksheet Functions | |||
Syntax for 2 AND conditions within an OR function. | Excel Worksheet Functions | |||
In Excel, why sort function fails when applied to a list of date? | Excel Discussion (Misc queries) | |||
Does anyone have a copy of the Peter Noneley: Function list? | New Users to Excel |