简体   繁体   English

如何检查其他工作表中是否存在值,然后从行中的另一个单元格输出值

[英]How to check if value exists in other sheet, then output value from another cell in the row

I am completely stumped here and don't know the proper spreadsheet terminology. 我在这里完全迷住了,不知道正确的电子表格术语。

So I have one sheet which has the following three columns 所以我有一张纸,其中有以下三列

  • Comment ID 评论编号
  • Comment Post ID 评论帖子ID
  • Comment 评论

Now the post ID refers to the ID of the post the comment was created on. 现在,帖子ID指的是创建评论的帖子的ID。

I have a second sheet (in the same workbook) that has the following columns: 我有第二个工作表(在同一工作簿中),该工作表具有以下各列:

  • Post ID 职位编号
  • Post Title 帖子标题

How can I run a formula that makes Excel replace the values in 'Comment Post ID' with the correlating titles? 如何运行公式,使Excel用相关标题替换“注释帖子ID”中的值?

Thanks! 谢谢!

Say the Comment items are on Sheet 1 columns A:C and the Post items are on Sheet 2 columns A:B , in order, with headers. 说注释项在工作Sheet 1 columns A:C ,而发布项在工作Sheet 2 columns A:B按顺序排列,并带有标题。

In Sheet 1 column D Row 2 use 在工作Sheet 1 column D Row 2使用

=VLOOKUP(B2,Sheet2!A:B,2,FALSE)

You can drag that down as far as your data goes and it will lookup the Comment Post ID from Sheet 1 column B to find the matching title in Sheet 2 Column B . 您可以将其向下拖动到数据为止,它将在工作Sheet 1 column B查找注释帖子ID,以在工作Sheet 2 Column B找到匹配的标题。

If you really want to replace your Comment Post ID column with the titles then just copy and paste the values of your new column D 如果您确实要用标题替换“评论文章ID”列,则只需复制并粘贴新列D的值

暂无
暂无

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

相关问题 检查其他多个工作表上是否存在excel单元格值-如果是,则返回存在于另一列中的工作表名称 - Check if an excel cell value exists on multiple other sheets - and if so return the name of the sheet it exists on in another column 如果工作表上的单元格值与另一张表上的单元格值相同,则删除该行 - Delete the row if the cell value on sheet is the same then the cell value on another sheet Excel如果单元格&lt;=值,如何将数据行从工作表1复制到工作表2 - Excel how copy row of data from sheet 1 to sheet 2 if a cell <= Value 将显式列与另一工作表中的单元格值用于行 - Using an explicity Column with a cell value from another sheet for Row 根据行/列索引从另一个工作表中查找单元格值 - Finding the cell value from another sheet basing on row/column index 如果C的单元格值与工作表名称匹配,如何将行复制到另一工作表 - How to copy row to another sheet if the cell value of C matches the sheetname 在工作表的最后一行中用另一个替换单元格值 - Replacing a cell value with another in the last row of a sheet 根据单元格中的值将行复制到另一张工作表 - Copy row to another sheet based on value in a cell 如何从单元格值引用另一个工作表上的单元格 - How to reference cell on another sheet from cell value 如何根据单元格值将行内的范围从一个 Excel 工作表复制到另一个 - How to copy a range within a row from one excel sheet to another based on a cell value
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM