Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am attempting to search for data anywhere in a column. I have the following formula but I think I need a wild card. My data may be in cell J2012 instead of J2. Suggestions?

=IF( COUNTIF($A:$A,$J2)<>0, "-", "Not in J")
share|improve this question
1  
are you trying to see if anything in column A matches anything in column J, or are you trying to look for a specific value? also, do you just want to know if it exists, or do you want to know where your data is? –  Sean Cheshire Aug 9 '12 at 18:15

1 Answer 1

Your formula appears functional to me, but I wonder if you have it backwards of how you want it to work. Right now, it is searching the whole of column A for the contents of cell J2. Because you have Countif() <> 0 it will return "Not in J" if the contents of J2 are found anywhere in column A. If you want it to return "Not in J" if it isn't found in the column, I suggest you change the <> to an = to achieve this. If I've misunderstood your objective, perhaps you can provide some more details of how your data is set up and what you are trying to check.


EDIT:

If what you're trying to accomplish is this:

enter image description here

Then you should use the formula =IF(COUNTIF($J:$J,"*"&A1&"*"), "-", "Not in J") like this:

enter image description here

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.