In Excel:
If you have a table in which someone merged cells or copied a table from the html site, where there may be many inconsistencies in the copied data, such as empty lines, which really should have the same value as the previous row to fix this , go to the empty column and create the following formula. This assumes that your heading in A1 and A2 contains the first data and a valid row value.
If only every other cell is empty, you can do the following:
= if(A2="",A1,A2)
The above function checks if A2 is empty, if it is IS, it assigns the value A1, if it is NOT, it assigns the value A2.
However, if there are several blank lines that need to be filled, it is better to do the following:
(suppose the cell whose value you want to duplicate in all subsequent empty cells starts with A2, you are ready to set the first two cells in the next column manually, column I: I am the first empty column in your table)
Step one: in cells I2 and I3, make sure that the corresponding values ​​are present for the corresponding rows.
Step Two: In cell I4, enter the following formula:
= if(A4="",if(A3<>"",A3,I3),A4)
The above function checks if A4 is free, if it is IS, it checks if A3 is not empty, if it is really NOT, it assigns the value A3, if it is too empty, it assigns the value in I3, finally if A4 was not empty, he assigns the value A4.
You will have to drag the formula manually (since there are blank lines).
Any empty row that follows data that you do not want should be easily identified by sorting the column by key field.
As stated above, you are dealing with formula values, so you cannot just move them overwriting the original cells, but if you do a “special” insert, you can paste the values ​​directly above your original cells.