简体   繁体   English

仅当两个单独的单元格匹配时才将值从一个单元格移动到另一个单元格

[英]Moving values from one cell to another only if two separate cells match

I am attempting to find a formula that will pull values from a cell only if two separate cells match.我试图找到一个公式,该公式仅在两个单独的单元格匹配时才从单元格中提取值。 I did this already with =sumif by using the formula =SUMIFS(E7:E24, A7:A24,"Won", D7:D24, D31) this would add the numbers I needed in E7:E24, check to make sure A7:A24 contained the word "Won", and then cross reference D7:D24 with D31 to make sure the two matched to give me my goal.我已经使用 =sumif 使用公式=SUMIFS(E7:E24, A7:A24,"Won", D7:D24, D31)这样做了这将添加我在 E7:E24 中需要的数字,检查以确保 A7: A24 包含单词“Won”,然后将 D7:D24 与 D31 交叉引用,以确保两者匹配以达到我的目标。 I needed this due to being able to use a drop down menu instead of manually inputting lots repetitive info.我需要这个是因为能够使用下拉菜单而不是手动输入大量重复信息。 I am trying to do this again but I am unable to use the =sumifs formula as I am trying to bring in words and not numbers.我正在尝试再次执行此操作,但我无法使用 =sumifs 公式,因为我试图引入单词而不是数字。 Google hasn't been much help in this endeavor either.谷歌在这方面也没有多大帮助。 I have created a sample sheet Here with some basic info provided.我在这里创建了一个示例表,其中提供了一些基本信息。 J2 contains my issue and shows which cells I am trying to pull from. J2 包含我的问题并显示我试图从哪些单元格中提取。 Any assistance on this would be wonderful!对此的任何帮助都会很棒!

try:尝试:

=ARRAYFORMULA(TEXTJOIN(", ", 1, IF(REGEXMATCH('C'!G6:AT6, A2), 'C'!G10:AT10, )))

0

for full array you can do:对于全阵列,您可以执行以下操作:

=ARRAYFORMULA(HLOOKUP($A$2, $AD$6:$AT, ROW($A$5:$A$8)+MATCH(K1, $A$10:$A, 0)-1, 0))

在此处输入图片说明

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

相关问题 如果值与来自两个单独列的条件匹配,则对一列中的单元格求和 - Sum cells in one column, if values match criteria from two separate columns 将列值与行值匹配以将一个单元格从一个工作表复制到另一个工作表 - Match column values with Row values to copy a cell from one worksheet to another 使用脚本Google表格将数据从一个单元格范围移动到另一个单元格 - Moving data from one range of cells to another with a script Google Sheets 将所有单元格合并为一个单元格并用逗号分隔 - Merge all cells to one cell and separate with comma 条件格式化单元格以匹配另一个单元格 - Conditional formatting cells to match another cell 如果其他两个单元格中的值匹配,如何突出显示某个颜色的单元格? - How Do I Highlight a Cell a Certain Color if the values in two other cells match? VBA-将值从一个单元格复制到另一个偏移量单元格 - VBA- Copying Values from one cell to another offset cell 根据所选值将行从一张纸移动到另一张纸 - Moving Rows from one sheet to another based on selected values 将数据从一张表导入另一张表中的“仅一个单元格” - Import data from one sheet to “only one cell” in another sheet 从多个单元格中抓取信息并根据特定的文本匹配将其显示在一个单元格中 - Grab information from multiple cells and display it in one cell based on specific text match
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM