How to separate data in one column into two colums based on data in other column in Excel

Brian Lambert 1 Reputation point
2022-01-20T21:12:13.34+00:00

Hello!

I need to separate number the numbers in one column (Column A) based on the identifiers in another column (Column B). In the attached example, I need all of the identifiers in Column B to be separated out and placed into new columns. For example, Type A numbers need to be in one column and all of the Type B numbers in another column.

How would I go about doing this?

Thank you for any help that you can provide!

166933-screen-shot-2022-01-20-at-40610-pm.png

166914-image.png

Microsoft 365 and Office Development Other
Microsoft 365 and Office Excel For business Windows
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Herbert Seidenberg 1,191 Reputation points
    2022-01-21T01:52:00.387+00:00
    0 comments No comments

  2. Emily Hua-MSFT 27,796 Reputation points
    2022-01-21T06:34:14.733+00:00

    Hi @Brian Lambert ,

    You could try the Index and Match function.

    Enter the formula =IFERROR(INDEX($A$1:$A$6,SMALL(IF($B$1:$B$6=D$1,ROW($1:$6),4^8),ROW(1:1)))&"","") in Cell D2 on my sample.
    As this formula is an array formula, I need to press Ctrl + Shift + Enter.
    167017-capture6.png
    Then drag down and right.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.



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.