简体   繁体   English

根据匹配条件在Excel中替换单元格值

[英]Substituting cell values in Excel based on matching criteria

I'm not sure is my Title correct, but I don't know how else to put it. 我不确定标题是否正确,但我不知道该怎么写。 Not an Excel expert so I would need help here. 不是Excel专家,因此我在这里需要帮助。
I'm having COL A and COL B, COL A containing a name and COL B containing a link to COL A. All values in COL A and COL B are unique. 我有COL A和COL B,COL A包含名称,COL B包含指向COL A的链接。COLA和COL B中的所有值都是唯一的。

Then I have COLUMNS C, D, E, F, G, H containing values from COL A. 然后我有C,D,E,F,G,H列,其中包含来自COL A的值。

I need to replace each value in COLUMNS C, D, E, F, G, H with the value from COLUMN B (link). 我需要将C,D,E,F,G,H列中的每个值替换为B列(链接)中的值。

Maybe a screenshot will explain it better. 也许截图可以更好地解释它。 在此处输入图片说明 I really don't know how to do that, so straight to the point answer would be awesome. 我真的不知道该怎么做,所以直接回答要好。 I'm working with Google Spreadsheets and Excel, but I don't know how to create macros, so solution with formulas would be appreciated. 我正在使用Google Spreadsheets和Excel,但是我不知道如何创建宏,因此不胜感激使用公式的解决方案。

Im not sure how to replace the value in the Column C,D...H but you can get the values in corresponding columns I, J...N 我不确定如何替换C,D ... H列中的值,但可以在相应的I,J ... N列中获取值

Step 1: Enter the follwing formula in Cell I1 步骤1:在单元格I1中输入以下公式

=INDIRECT((ADDRESS(MATCH(C1,$A:$A,0),2,3,1)))

Step 2: Copy the formula to all cell in Column I, J, K, L, M and N Note- The formula already has absolute and relative reference in it so there is no need to change the formula for each cell 步骤2:将公式复制到I,J,K,L,M和N列中的所有单元格注-公式中已经具有绝对和相对引用,因此无需更改每个单元格的公式

Step 3: Copy Column IN and use "Ctrl+Alt+V to paste in place of Columns CH and select "Values" in the dialogue box and hit enter 步骤3:复制“列IN”,然后使用“ Ctrl + Alt + V”粘贴到“列CH”的位置,然后在对话框中选择“值”,然后按Enter

You can leave out step 3 if you dont mind having a second set of links alone. 如果您不介意仅拥有第二组链接,则可以省去步骤3。

I'm not an expert in Excel but I believe my solution gets the job done although there may be more efficient ways out there. 我不是Excel方面的专家,但我相信我的解决方案可以完成工作,尽管可能有更有效的方法。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM