Copy entire row if cell contains any data

I have a rows of data on sheet 1. I need to copy each row on sheet 1 over to sheet 2 if Column H on sheet 1 has any data in cell.

How would I go about that?

thanks
Jason

  1. add a button to your app somewhere.
  2. Create an automation for that button.
  3. Add the Add a row step.
  4. Open run options.
  5. Run step for these rows: =filter(table1, "table1[colH]<>%", "")
  6. Add row to =table2
  7. Take data from =[ColA] and write to Col A.
    ^ Repeat 7 as necessary.

I think that would work for you. Basically, you just run an "Add row" action once for every row returned by the filter defined in step 5. That filter should return every row from table1 that has any data in a defined column.

just to be clear, will I have to click on the button every time for it to work or only once?

OK I played around with it and it looks like it partially works if I click on the button. Is there a way to just do a filter on table 2 that will copy the row if the data in cell H is greater than 0?

Hi @Jawsfree, wanted to add to this - if you are seeking a way to automate what you are trying to accomplish but without a button, you can use Workbook Automations. These are based purely on data changes within your table(s). Meaning, you wouldn't have to use a button in builder. I set up an example configuration that I believe meets the need you have described, which is if H column in Table 1 changes and is > 0, then copy the row to Table 2. Here's a short video:

As an alternative, as you have indicated above, you can also accomplish it via Builder and a form/button. Basically you have a form that will prompt the user to provide data for the 8 fields (table columns). If field/column 8 is =< 0, then add the row to just Table 1. If > 0, then add to both Table 1 and Table 2. Using Run Options in the automation, here's the expression =if($[Column8 content]>0,TRUE,FALSE)

Hope this helps!

1 Like