[英]Fill blank cell in Excel with value with same ID
I'm not so advanced in excel I need help if is it possible to do. 我的excel不太先进,如果可以的话我需要帮助。 I have an excel with this column: ID - Value1 - Value2 我在此列中具有Excel:ID-Value1-Value2
I need to update the value1 (or value2): - only if are blank AND only if the row has the same ID 我需要更新value1(或value2):-仅当为空且仅当行具有相同的ID时
I make an example, I have this table: 我举一个例子,我有这张桌子:
ID Value1 Value2
A1 1 100
A2 2
A3 3
A4 1 200
A5 2 250
Iwould like to fill all the empty cell in this way 我想以此方式填充所有空单元格
ID Value1 Value2
A1 1 100 200
A2 2 250
A3 3
A4 1 100 200
A5 2 250
Thank you for any help. 感谢您的任何帮助。
Ok, so your data is a mixture of numbers and texts. 好的,因此您的数据是数字和文本的混合。 You can generate two new columns with the desired values using formulas. 您可以使用公式生成两个具有所需值的新列。 Choose two new, adjacent columns, say D and E, and enter this CSE formula in row say in cell D2
: 选择两个相邻的新列,例如D和E,并在单元格D2
中的行中输入此CSE公式 :
D2:
=IFERROR(IF(ISBLANK(B2),INDEX(B$2:B$99,
MATCH(1,($A$2:$A$99=$A2)*(1-ISBLANK(B$2:B$99)),0)),B2), "")
Ctrl Shift Enter Ctrl Shift 输入
Enter the formula in D2
with Ctrl Shift Enter and then copy/paste in the cells of columns D and E (or as I said any two adjacent columns). 使用Ctrl Shift Enter在D2
输入公式,然后将其复制/粘贴到D和E列的单元格中(或按我所说的两个相邻列)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.