Formula problem Excel

KOE NATE 0 Reputation points
2024-10-29T14:39:36.5666667+00:00

Can you please help me? I have a table where columns A and B are combinations of 12 to 19 numbers, and I need to obtain the common number between columns A and B.

Any help is appreciated.

Office
Office
A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.
1,718 questions
Excel
Excel
A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
1,970 questions
Excel Management
Excel Management
Excel: A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.Management: The act or process of organizing, handling, directing or controlling something.
1,728 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Barry Schwarz 3,071 Reputation points
    2024-10-30T01:33:38.0733333+00:00

    Assuming you want the common number to appear in another cell, you can do this relatively simply in a macro function.Select the area in column A. Hold down the control key and select the area in column B. This produces a selection range with two areas. In the target cell, invoke the macro.

    The macro simply loops through the first area. For each cell, it loops through the second area. If it finds a match, that is the common value. If not, it repeats this loop for the next cell in the first area. If no match is found at all, it returns an error value of your choice, such as #NA.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.