1

Sorry if this is confusing. I'm having trouble articulating what I need exactly, which is why I'm here instead of Google. My searches have been fruitless because I'm not sure what even what types of functions I'm looking for.

Here's my situation: I have a set of anonymous people and I need to make them not anonymous again.

I have a sheet with lots of data, where 1 column is each person's ID number. Elsewhere in this same sheet, I've created a key with each individual ID number in 1 column and their name in the next column.

I've added an empty column next to the ID numbers within the dataset.

What I need now is a formula that will search the key for the ID number, match it with the ID in my data, then fill in the blank column with the actual names.

Basically:

  • Column A is IDs.
  • Column B is empty (where I'll put the formula)
  • Columns C and D are the key, where Column C has each ID number once, and D has the corresponding names.

What formula (functions) can search column C for an exact match with column A and then fill B with the corresponding names as found in D?

1

1 Answer 1

0

Use vlookup(), like this:

=vlookup(A2, C$2:D, columns(C$2:D), false)

To evaluate the formula over the whole column in one go, use:

=arrayformula( iferror( vlookup(A2:A, C2:D, columns(C2:D), false) ) )

See vlookup().

1
  • Thank you so much! Of course it's Vlookup... Ugh. What a freaking brain fart. Thank you!!!
    – JRM
    Commented Feb 15, 2023 at 21:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.