简体   繁体   中英

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. 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).

If 'text1' is entered, in column B and CI would like 'Heading 2' and 'Heading 3' to populate.

If 'text2' is entered, in column B and CI would like 'Heading 3' and 'Heading 4' to populate.

If 'text3' is entered, in column B and CI would like 'Heading 5' and 'Heading 6' to populate.

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:

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

and in C2 enter:

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

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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