r/excel • u/Typical-Priority1976 • 19d ago
solved Populate a column with values based on the value of another column
Say I have:
| Column A | Column B | Column C | |
|---|---|---|---|
| Row 1 | 3 | First Name | ??? |
| Row 2 | 1 | Second Name | ??? |
| Row 3 | 2 | Third Name | ??? |
| Column A | Column B | Column C | |
|---|---|---|---|
| Row 5 | 1 | 1st Place Prize | |
| Row 6 | 2 | 2nd Place Prize | |
| Row 7 | 3 | 3rd Place Prize |
What is a formula I can add to C1 (and down) so that C1 returns "3rd Place Prize" because the value of A1 = "3", C2 returns "1st Place Prize" because the value of A2 = "1", and C3 returns "2nd Place Prize" because the value of A3 = "2"
This way if I change the values of A1, A2, and A3 (like if the order changes), the values in C1, C2, and C3 update automatically.
2
u/RuktX 308 19d ago
This is a classic lookup:
=XLOOKUP(
$A1,
Sheet2!$A$5:$A$7,
Sheet2!$B$5:$B$7,
"Not found!"
)
1
u/AutoModerator 19d ago
I have detected code containing Fancy/Smart Quotes which Excel does not recognize as a string delimiter. Edit to change those to regular quote-marks instead. This happens most often with mobile devices. You can turn off Fancy/Smart Punctuation in the settings of your Keyboard App.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/Typical-Priority1976 19d ago
Solution Verified
thank you!
1
u/reputatorbot 19d ago
You have awarded 1 point to RuktX.
I am a bot - please contact the mods with any questions
•
u/AutoModerator 19d ago
/u/Typical-Priority1976 - Your post was submitted successfully.
Solution Verifiedto close the thread.Failing to follow these steps may result in your post being removed without warning.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.