Excel How to Move a Cell Value and Delete the Empty Row
Problem description & analysis
Below is Excel data:
If the value of column A is empty, copy the value of column C in the current row to column D of the previous row. Continue such operation in a loop, and then delete the currently empty rows. Below is the expected result:
Solution & explanation
Use SPL XLL plug-in of Excel
Write the formula in a blank cell:
=spl("=?.run(if(~(1)==null,~[-1](4)=~(3))).select(~(1))",A1:D6)
As shown:
Explanation:
Handle each row in a loop. For the current row, if the first member is null, the value of the third member of the current row is assigned to the fourth member of the previous row and then filter away the row where the first member is null.
https://stackoverflow.com/questions/63790459/check-cut-and-paste-delete-row-move
SPL Official Website 👉 https://www.scudata.com
SPL Feedback and Help 👉 https://www.reddit.com/r/esProc_Desktop/
SPL Learning Material 👉 https://c.scudata.com
Discord 👉 https://discord.gg/cFTcUNs7
Youtube 👉 https://www.youtube.com/@esProcDesktop
Linkedin Group 👉 https://www.linkedin.com/groups/14419406/