Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
tanya
 
Posts: n/a
Default 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   Report Post  
Ola
 
Posts: n/a
Default

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   Report Post  
Bob Phillips
 
Posts: n/a
Default

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Recent File List Check Box Greyed out Bruce Wilson Excel Discussion (Misc queries) 7 February 22nd 07 03:15 PM
need function to sum top ranking items in list QuantumPion Excel Worksheet Functions 13 June 6th 05 10:42 AM
Syntax for 2 AND conditions within an OR function. Mike K Excel Worksheet Functions 5 June 3rd 05 12:06 AM
In Excel, why sort function fails when applied to a list of date? Excel heavy user Excel Discussion (Misc queries) 1 January 18th 05 06:37 PM
Does anyone have a copy of the Peter Noneley: Function list? Marc New Users to Excel 1 December 6th 04 08:52 PM


All times are GMT +1. The time now is 10:03 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"