The source data has no rows or column = how to ignore?

Hello

I would like to move:

And then delete it from the sheet; All names

And it works OK when there are rows with a name Mark:

But, sometimes I might get a list where there is no entry with “Mark” and I get an error::

image

How can I make it so that when there is no mark, then the automation just doesn’t move anything and carry on?

I’d say you’re missing an “If” statement somewhere, most likely when you’re writing data to sheet “All marks” but it’s hard to say where, without seeing your code. If you’re writing data to the new sheet as a DataTable, add an If statement to check if the RowCount is empty before writing the data.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.