I'm in the planning phase for a piece of code that I am implementing. I wanted to know what is the most efficient way to copy and paste a row of values to another tab if the value in column "x" equals a certain value.
Here are the methods I'm thinking of. I just want to know which is the most efficient as far as speed of execution and # of lines of code.
- Filter sheet and copy results to new tab.
- Loop through each row and copy them over to new tab if value in cell equals what we are looking for.
- Loop through each row and push to array if value in cell equals what we are looking for. Then paste array values to new tab.
Any other methods I missed?
Example:
In the above I'd like to copy over the rows with values "xyz" in column D to a new tab.
Edit: I'm going through a minimum of 8K lines on a spreadsheet so speed of execution is key.