Home » excel » excel – Return Value in a column based on value in a subset in another column

excel – Return Value in a column based on value in a subset in another column

Posted by: admin May 14, 2020 Leave a comment

Questions:

I’m working on taking information from a table like so:

A    1
     2
B    3
     1
     4
C    2
     5

Essentially, a series of sets (A,B,C) with their elements arranged vertically beside them.

What I’m trying to do is retrieve the list of column 1 values that have a certain value in column 2. For instance, if the lookup value for column 2 was 1, I would want A and B to match, but not C. Best case scenario, I could generate a new column containing the matches. Is there a way to do this without resorting to VBA?

EDIT:
The data I am working with is not so clean, here’s a doctored version of it

 1           2                  3      4

83    Fun Edit      ZZZZZZ*AAAAAA    210
                    365,400          176
                                     210
85    Fun Edit      600,500          205
                    MEDICARE[705]    176
                                     200

The extracted data does not like to preserve relationships between data beyond the column 1 identifier. In this case, the information in column 3 “

Answer:

,

Answer:

” comes from item 176 in column 4. So filling down and taking the row will result in issues downstream.

In the long run, the data in column 4 is just a key for matching the information in this extract with another one.

I appreciate everyone’s help thus far, and apologize for my insufficient original example.

How to&Answers:

Here’s a short workflow that will do it:

  1. Select the entire range
  2. Press Ctrl+G (Goto)
  3. Click Special
  4. Tick Blanks and OK
  5. Type = and arrow up. You should have a formula that looks like =A1
  6. Press Ctrl+Enter. At this point all the missing alpha values should be filled in.
  7. Apply Autofilter and filter the numbers to show only 1
  8. If you want to use the filtered alpha list elsewhere, copy the values showing, and paste elsewhere.