简体   繁体   中英

How do I autofill a range of cells with values, based on another cell's value? Is there an Excel's equivalent of GoogleSheet's arrayformula?

Edit: 1) I use O365 2) Google Formula =ARRAYFORMULA((if(D3=Parameters!B12,Parameters!B13:B20,if(D3=Parameters!C12,Parameters!C13:C20,if(D3=Parameters!D12,Parameters!D13:D20,if(D3=Parameters!E12,Parameters!E13:E20,if(D3=Parameters!F12,Parameters!F13:F20)))))))

I was able to the the thing below in Google Sheets using Arrayformula and nested IFs, but how do I do it in Excel?

Say, A1 is a dropdown, and depending on what the user chooses for A1, I want A3 - A7 to automatically populate.

Examples

If A1=Cat, I want A3, A4, A5 to automatically populate with Tiger, Lion, and Lynx

If A1=K9, I want A3, A4, A5, A6, A7 to automatically populate with Wolf, Fox, Dog, Big Dog, and Good Boi

     |    A    |
1    |   Cat   |
2    |         |
3    |  Tiger  |
4    |  Lion   |
5    |  Lynx   |
6    |         |
7    |         |


     |    A    |
1    |    K9   |
2    |         |
3    |  Wolf   |
4    |  Fox    |
5    |  Dog    |
6    | Big Dog |
7    | Good Boi|

How can I do this in Excel?

The technique depends on which version of Excel you have.

Excel without the new Dynamic Array formulas will require you to pre-fill the cells with a formula that looks up the value.

With the new Dynamic Arrays (currently only available in Office 365 Insider), you can have just one formula in A3 and it will spill down automatically. In the screenshot, the formula is only in A3, nothing has been copied down.

在此处输入图片说明

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