"Cleaning up" sheets that are the target of copy row automations

I'm a new user, and this is my first question to the community, so I hope it makes sense and hasn't been answered elsewhere.

I have an automation that copies rows from Sheet A to Sheet B. The Columns in Sheet A were originally titled Column1, Column2, and Column3. In the process of tweaking the solution, I renamed the first two columns (at different times) Column1-new, Column2-new, and added Column4.

Now, Sheet B shows the following columns: Column1, Column2, Column3, Column1-new, Column4, and Column2-new. The data is all there, but is there a simple way to clean up Sheet B so it reflects the column order of Sheet A? Or do I need to delete Column1 and Column2 and move things around manually? Or am I missing another solution?

Best Answer

  • KPH
    KPH Community Champion
    Answer ✓

    I would create new columns and use an IF formula to pull in the value from Column1 if it exists and if it is blank, the value from Column1-new. This will get all the data into one column, no matter where it is at the moment. You can make this a column formula and it will populate for all the rows.

    If this is a one time tidy up, you can then copy the values from the new column and paste special/paste values into Column1-new then delete Column1 and the column that you created with the formula in.

    Any new rows will populate the column in Sheet B where the name matches that in Sheet A.

    The syntax for the IF formula is

    =IF(ISBLANK([Column1]@row), [Column1-new]@row, [Column1]@row)

    repeat for Column 2.

    Hope this helps.

Answers

  • KPH
    KPH Community Champion
    Answer ✓

    I would create new columns and use an IF formula to pull in the value from Column1 if it exists and if it is blank, the value from Column1-new. This will get all the data into one column, no matter where it is at the moment. You can make this a column formula and it will populate for all the rows.

    If this is a one time tidy up, you can then copy the values from the new column and paste special/paste values into Column1-new then delete Column1 and the column that you created with the formula in.

    Any new rows will populate the column in Sheet B where the name matches that in Sheet A.

    The syntax for the IF formula is

    =IF(ISBLANK([Column1]@row), [Column1-new]@row, [Column1]@row)

    repeat for Column 2.

    Hope this helps.

  • Thanks @KPH, I'll give it a try!

  • KPH
    KPH Community Champion

    Let us know how you get on. Good luck!