Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

Excel Spreadsheet Command: Searching a Column?

Update:

I have two columns of alpha-numeric account numbers. I want to know if the account number in AI is found anywhere in column B, if the account number in A2 is found anywhere in column B, and so forth. I have a few hundred account numbers, so I want to find a way to do this automatically, instead of manually (as my company assumes we will have to do.)

Thanks!

1 Answer

Relevance
  • Greg G
    Lv 7
    7 years ago

    A couple of options.

    Option 1:

    Use conditional formatting in column A to highlight the cell if there is a match in column B:

    Select every cell in column A with data in it, then click on Conditional Formatting, New Rule, Use a formula, and enter this formula:

    =COUNTIF($B:$B, $A1)>0

    Pick the formatting, whatever color you want to highlight to show a match, then click OK to close all windows. Anything in column A that is also in column B will now be highlighted.

    Option 2:

    Use this in C1:

    =IF(COUNTIF(B:B, A1), "Match", "No Match")

    So if the value in A1 matches anywhere in column B, "Match" is displayed. If it is not in column B, "No Match" is displayed.

    Copy that formula down column C as far as needed. Screen shot shows both options, so choose whichever one suits your needs better.

    Attachment image
Still have questions? Get your answers by asking now.