Share via

Formula to replace specific values in one column with corresponding values in a different column

Anonymous
2022-05-11T09:50:57+00:00

Hello, I have data in the following format

Gender_1 Gender_2
Man NA
NA Woman
NA Man
Woman NA

I wish to replace the NA in gender_1 with the corresponding Woman, Man in Gender_2, is there a formula to perform this task? The original dataset has 100s of such entries.

Gender_1 Gender_2
Man NA
Woman Woman
Man Man
Woman NA

Thank you!

Microsoft 365 and Office | Excel | For home | 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

Anonymous
2022-05-11T09:56:00+00:00

You can not use a formula in a cell to replace the value based on that cell value itself.

You can however enter this in C1, assuming you have your data in Col A and B

=IF(A2="NA",B2,A2)

and copy down.

You can then copy values in Col C and PASTE SPECIAL -> AS VALUES over values in Col A

Result

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Anonymous
    2022-05-22T13:04:06+00:00

    Thank you!

    Was this answer helpful?

    0 comments No comments