[英]How to change values in a column based on cell values in another column in excel?
I read about if
condition but apparently it only applies to single cell
of two columns
. 我了解了
if
条件,但显然它仅适用于two columns
single cell
。 I was wondering if there is way to modify the entire column based on cell values from another column. 我想知道是否有办法根据另一列的单元格值修改整个列。 For example
例如
================= ================
A B
================= ================
France Hong Kong
USA New York
China Hong Kong
China New York
I want cell values in col A to change based on col B , so France becomes China in row 1 and China becomes USA in row 4 and so on. 我希望col A中的单元格值基于col B进行更改,因此法国在第1行中成为中国,在 中国在第4行中成为美国 ,依此类推。 Is there any way to accomplish this?
有什么办法可以做到这一点?
Have a table in Sheet2 as follows. 在Sheet2中有一个表,如下所示。
================= ================
A B
================= ================
Delhi India
New York USA
Hong Kong China
Then in first sheet use the following formula. 然后在第一页中使用以下公式。
=INDIRECT( "Sheet2!B" & MATCH(A1, Sheet2!A:A, 0) ) = INDIRECT(“ Sheet2!B”&MATCH(A1,Sheet2!A:A,0))
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.