Share via

Zip Code Formula & Index Formula

Anonymous
2022-09-22T20:30:13+00:00

Sheet 2

Column A - Zip codes

Row 2: 12345

Row 3: 12345-6789

Row 4: 23456

Row 5: 34567-8912

Column B - zip code helper column

Row 2: left(a2, 5) = 12345

Row 3: left(a3, 5) = 12345

Row 4: left(a4, 5) = 23456

Row 5: left(a5, 5) = 34567

Column C - index formula

Index(Sheet1!B:B, match(B2, Sheet1!A:A,0))

This formula is not working. Columns A and B are formatted as General, not Zip Code, or Zip Code +4, or Text. Any solutions?

Sheet 1

Column A - zip codes

Column B - county name

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

Answer accepted by question author

  1. HansV 462.6K Reputation points MVP Volunteer Moderator
    2022-09-22T21:38:07+00:00

    LEFT returns a text value, while column A on Sheet1 contains numbers. Change the formula in B2 on Sheet2 to

    =--LEFT(A2,5)

    and fill down.

    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Anonymous
    2022-09-22T21:32:09+00:00

    Hi there

    Question

    Are the ZIP codes in Sheet1 column A in the same format as the helper column in Sheet2?

    Regards

    Jeovany

    0 comments No comments