简体   繁体   English

Excel公式以上方的单元格填充下方的单元格,直到值更改

[英]Excel formula to fill cell below with cell above until value changes

if A is a column in an excel spreadsheet, I would like to fill the blank cells in the subsequent rows of A with the value of the last cell above it that had one. 如果A是excel电子表格中的一列,我想用A上方的最后A具有一个单元格的值填充A后续行中的空白单元格。 Once the column has a another cell with a value, use the value, and so on. 一旦该列具有另一个具有值的单元格,请使用该值,依此类推。 This works, using Go To Special > Blanks > = up arrow > ctrl enter. 这个工作,使用转到特殊>空白> = up arrow > CTRL + ENTER。 Is there a way to do this with a formula? 有没有办法用公式做到这一点? Thanks. 谢谢。

A A A A

1 1 1 1

_ 1 _ 1

_ 1 _ 1

2 2 2 2

_ 2 _ 2

_ 2 _ 2

_ 2 _ 2

3 3 3 3

_ 3 _ 3

etc etc etc etc

If you add a temp column and fill it with this, the new column should have the desired data. 如果添加临时列并用它填充,则新列应具有所需的数据。 Assuming data is in column A, populate B1 yourself and then put this in B2 and fill down: 假设数据在A列中,请自己填充B1,然后将其放入B2中并填写:

=if(A2<>"",A2,B1)

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

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