How to automatically fill cells in a column with data already in it based on content in a different column?

Anonymous
2023-06-06T16:41:18+00:00

Hello,

I have a data set with thousands of entries. The relevant columns are an ID #, column A, and the Zip Code, column B.

I want the data to auto-fill in the Zip Code column for each ID #. The first entry for each ID # should have a zip code entered, but there are some that don't have that data (ID # 3 in the screenshot).

I have tried Flash Fill but it doesn't see a pattern to base it off.

Screenshot example below if there's no attachment (it kept saying my upload failed).

Thank you,

Microsoft 365 and Office | Excel | For business | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes
Answer accepted by question author
  1. HansV 462.4K Reputation points MVP Volunteer Moderator
    2023-06-06T20:29:01+00:00

    Select column B.

    Press F5 to display the Go To dialog.

    Click Special...

    Select Blanks, then click OK.

    Note the address of the active cell in the selection (on the left hand side of the formula bar). It should be B3.

    Enter the following formula and confirm it by pressing Ctrl+Enter to populate all selected cells.

    =IFERROR(VLOOKUP(A3,$A$2:$B2,2,FALSE),"-")

    or

    =XLOOKUP(A3,$A$2:$A2,$B$2:$B2,"-")

    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Anonymous
    2023-06-06T23:09:34+00:00

    Yes, that did it.

    Thank you very much! You just saved me a lot of time each month.

    0 comments No comments