简体   繁体   English

根据另一个单元格数据填充单元格中的数据

[英]Populate data in cell based on another cells data

I'm trying to look at one cell and populate another cell based on the other value.我正在尝试查看一个单元格并根据另一个值填充另一个单元格。 Keeping in mind, there are 100's of items.请记住,有 100 种物品。 Example:例子:

a1: Texas a1:德克萨斯州

b1: City is El Paso b1:城市是埃尔帕索

a2: Texas Oklahoma a2:德克萨斯俄克拉荷马州

b2: City is El Paso City is Enid b2: 城市是埃尔帕索 城市是伊妮德

So, one cell in A1 could have 1 to 10 different states.因此,A1 中的一个单元格可能有 1 到 10 个不同的状态。 B1 would need to fill in based on all the values of A1. B1 需要根据 A1 的所有值填写。

I'm assuming I would need a master table containing all the values and then based on what was in A, populate B, but I am not sure how to get there.我假设我需要一个包含所有值的主表,然后根据 A 中的内容填充 B,但我不确定如何到达那里。

Screenshot example: Screenshot example:] sample截图示例:截图示例:]示例

It sounds like you have 10 states and 10 cities, you have the list of states but you need to match the corresponding cities to each of the known states.听起来您有 10 个州和 10 个城市,您有州列表,但您需要将相应的城市与每个已知州匹配。

If this is the case, use the vlookup function like this.如果是这种情况,请像这样使用 vlookup function。

  1. Put a small table to the side with all the state and cities side by side with the cities to the right.在所有 state 和城市旁边放一张小桌子,与右边的城市并排。
  2. Use the vlookup formula VLOOKUP(A2, J:K, 2,FALSE)使用 vlookup 公式 VLOOKUP(A2, J:K, 2,FALSE)
    • Explaining this formula section by section逐节解释这个公式
    • A2 in this case will be cell the formula uses to search your table在这种情况下,A2 将是公式用于搜索表格的单元格
    • J:K is the columns your Table is in. J:K 是您的表格所在的列。
    • 2 tells the formula to give back the second column (counting left to right) 2 告诉公式返回第二列(从左到右计数)
    • FALSE, means only give things that exactly match what you are looking for. FALSE,意味着只提供与您正在寻找的东西完全匹配的东西。

查找

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 根据另一个单元格的内容替换单元格中的数据 - Replace data in cells based on content of another cell 用另一个工作表单元格上的数据填充一个工作表的多个单元格条目 - Populate multiple cell entries of one sheet with data on another sheet cells Excel-根据另一个单元格值填充多个单元格 - Excel - Populate multiple cells based on another cell value 根据用户输入的另一个单元格填充单元格的一部分 - Populate a portion of a cell based off another cells user input 根据另一个单元格的值,使用列表中的值填充几个单元格 - Populate several cells with values from list based on value of another cell 根据行的单元格数据在excel中插入复制的行,然后根据行引用单元格的部分填充单元格 - Insert copied row in excel based on row's cell data, then populate cells based on parts of row's referenced cell 根据标准将数据从一张表合并到另一张表,并仅填充特定单元格 - Merge data from one sheet to another based on criteria and only populate specific cells 如何使单元格基于下拉选择填充其他工作表中的数据 - how to make a cell populate data from another sheet based on dropdown selection 基于另一个具有数据的单元格格式化一个单元格 - Formatting a cell based on another cell having data 根据Excel中的另一个单元格自动填充单元格数据 - Autofill a cell data based on another cell in Excel
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM