View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
zvkmpw zvkmpw is offline
external usenet poster
 
Posts: 153
Default If value is true the check column for specific values

On Jan 22, 2:09*pm, MrPetreli
wrote:
Hi

I need a formula to check if a column contains specific values it the
column contains a certain value

if column A:A = string "ABC" then check A:A for string "123" & "456". If
"456" is missing then display list missing string in cell b2.

--
MrPetreli


The following formula seems to get the right answer for the stated
example, but I get the feeling there's more to it than that.

=IF(COUNTIF(A:A,"ABC")=0,"ABC",
IF(COUNTIF(A:A,"123")=0,"123 ","")&
IF(COUNTIF(A:A,"456")=0,"456",""))