Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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? – SeanC Aug 9 '12 at 18:15

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.


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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .