Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
234 views
in Technique[技术] by (71.8m points)

google sheets - Matching a value to an item taken from a dropdown list

I've got a particular problem that I'm hoping someone can help me solve. I'm using Google Sheets to build a character sheet for a roleplaying game. As part of the sheet, players can choose equipment from a dropdown list. The items in this list, and their related data, have been imported into the sheet already using IMPORTRANGE from another sheet that acts as a global database.

In this example, the player can choose from a list of weapons. The data also includes the weapon's attack power. There are thus two columns here in the equipment sheet: one that contains a drop down list with the possible weapons the player can choose from, and one that should retrieve the chosen weapon's attack power. This data exists side by side in the sheet already, but I'm having trouble accessing it. How can I automatically populate the attack power cell with the correct value to match the chosen weapon from the dropdown list? This data already exists in the spreadsheet side by side in the correct order so it doesn't seem like it should be difficult, but I'm not really sure how to do it!

Thanks in advance!

question from:https://stackoverflow.com/questions/65921803/matching-a-value-to-an-item-taken-from-a-dropdown-list

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

try simple VLOOKUP:

=IFNA(VLOOKUP(N13, U:V, 2, 0))

enter image description here

and then you can multiply it with value you wish if needed


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...