简体   繁体   English

如何根据另一个单元格的值自动为一系列单元格填充值? 有Excel等同于GoogleSheet的arrayformula吗?

[英]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))))))) 编辑:1)我使用O365 2)Google公式= 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? 我可以使用Arrayformula和嵌套IF在Google表格中进行以下操作,但是如何在Excel中进行操作呢?

Say, A1 is a dropdown, and depending on what the user chooses for A1, I want A3 - A7 to automatically populate. 假设A1是一个下拉菜单,并且根据用户为A1选择的内容,我希望A3-A7自动填充。

Examples 例子

If A1=Cat, I want A3, A4, A5 to automatically populate with Tiger, Lion, and Lynx 如果A1 = Cat,我希望A3,A4,A5自动填充Tiger,Lion和Lynx

If A1=K9, I want A3, A4, A5, A6, A7 to automatically populate with Wolf, Fox, Dog, Big Dog, and Good Boi 如果A1 = K9,我希望A3,A4,A5,A6,A7自动填充Wolf,Fox,Dog,Big Dog和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? 如何在Excel中做到这一点?

The technique depends on which version of Excel you have. 该技术取决于您拥有的Excel版本。

Excel without the new Dynamic Array formulas will require you to pre-fill the cells with a formula that looks up the value. 没有新的动态数组公式的Excel将要求您使用查找该值的公式来预填充单元格。

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. 使用新的动态数组(当前仅在Office 365 Insider中可用),您在A3中只能有一个公式,它将自动溢出。 In the screenshot, the formula is only in A3, nothing has been copied down. 在屏幕截图中,该公式仅在A3中,未复制任何内容。

在此处输入图片说明

暂无
暂无

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

相关问题 如何在Excel / Googlesheet中基于每个单元格的行标题(重复)和列标题(重复)对所有单元格求和? - How to sum all cells based on each cell's row header (duplicated) and column header (duplicated) in Excel/Googlesheet? 根据另一个像元范围的值填充像元 - Populating cells based on another cell range's value 可以根据另一个单元格的值锁定单元格范围吗? - Possible to Lock Range of cells based on another cell's value? 根据另一个单元格的值锁定和解锁单元格(excel 2013) - lock and unlock cells based on another cell's value (excel 2013) 如何根据字符串是否在另一个列表中自动填充单元格? - How do I Autofill a cell with string depending if it's in another list? 如何根据同一行中另一个单元格的值更改 Excel (在表格中)中单元格的颜色,并为每个新行重复此操作? - How do I change the colour of a cell in Excel (that's in a Table) based on the value of another cell in the same row and repeat this for each new row? Excel 根据其原始值和另一个单元格值更改单元格文本 - Excel change a cell text based on it's original value and another cells value 如何在Excel VBA中获取单元格的位置范围? - how do I get a cell's location as a range in excel vba? 如何根据另一个单元格中的信息自动填充Excel中的单元格 - How to autofill cells in Excel based on info in another cell 将一系列单元格的值与单个单元格的值进行比较 - Comparing values of a range of cells to a single cell's value
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM