简体   繁体   English

如果在另一个单元格中输入了某个值,是否有一个Excel公式填充多个单元格?

[英]Is there an Excel formula that populates a number of cells, if a certain value is entered in another cell?

I have an excel spreadsheet with a number of headings to collect certain information. 我有一个带有许多标题的excel电子表格,用于收集某些信息。 As an example: 举个例子:

In column AI have a heading (Heading1), and in the rest of the cells in this column through data validation there is only three possible pieces of text that can be entered here (text1, text2, text3). 在AI列中有一个标题(Heading1),在此列中通过数据验证的其余单元格中,只能在此处输入三个可能的文本片段(text1,text2,text3)。

If 'text1' is entered, in column B and CI would like 'Heading 2' and 'Heading 3' to populate. 如果输入了“ text1”,则在B列和CI中希望填充“标题2”和“标题3”。

If 'text2' is entered, in column B and CI would like 'Heading 3' and 'Heading 4' to populate. 如果输入了“ text2”,则在B列和CI中希望填充“标题3”和“标题4”。

If 'text3' is entered, in column B and CI would like 'Heading 5' and 'Heading 6' to populate. 如果输入了“ text3”,则在B列和CI中希望填充“标题5”和“标题6”。

Is there a formula or rule which can allow this, or is it not possible? 是否存在可以允许这样做的公式或规则,还是不可能?

With the headers in A1 through A6 , in B2 enter: 在标题A1A6中 ,在B2中输入:

=IF(A2="text1",$B$1,IF(A2="text2",$C$1,IF(A2="text3",$E$1,"")))

and in C2 enter: C2中输入:

=IF(A2="text1",$C$1,IF(A2="text2",$D$1,IF(A2="text3",$F$1,"")))

在此处输入图片说明

暂无
暂无

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

相关问题 Excel公式-如何将一个单元格中的公式值分为2个不同的单元格? - Excel formula - How to separate a formula value in a cell into 2 different cells? Excel:获取包含某些文本或公式的单元格的单元格集合 - Excel: get cell collection of cells that contain certain text or formula 当另一个单元格数值是某个数字时,用于输入新单元格数值的 Excel 公式 - Excel Formula for Entering a New Cell Numerical Value When Another Cell Numerical Value is Some Number excel公式,根据另一个单元格值编写 - excel formula, write based on another cell value Excel公式更改另一个单元格的值? - Excel formula to change the value of another cell? 如何在excel中插入另一个单元格的值而不是公式 - How to insert the value of another cell in excel not the formula Excel函数根据单元格值将一组单元格重复一定次数 - Excel Function to repeat a set of cells for a certain number of times based on cell value Excel VBA按特定顺序检查单元格,然后从另一个单元格中的其中一个返回值 - Excel VBA checks cells in certain order before returning a value from one of them in another cell 将单元格中的数字取一部分,然后将剩余部分移至另一个单元格+ excel公式 - take part of number in cell and move the remaining to another cell + excel formula Excel公式:列中唯一单元格的数量,IF对应的行是一定值 - Excel formula: count of unique cells in column, IF corresponding row is certain value
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM