I have data from a machine which I import into Excel and it gives a dataset which is around seven columns wide and 66000 rows deep. (Sometimes more, sometimes less.)
I want to select data based on Column E and then that will select all the rows so far, I can mirror that across to another sheet.
Column E contains a couple of thousand rows of zeros, then it changes to a number greater than zero for a few thousand rows. Then it loops back to zero etc. It will do this cycle around 25 times per data set. (Always different between number of rows per loop etc.)
I think I want two loops.
Loop 1:
Look at column E if it equals zero then select the row.
Do this until Column E does not equal zero.
Mirror this selection (I can use the Range.Resize method) into different area.
Delete the selection.
Shift cells up.
I would then call a similar loop for the values greater than zero and then recall loop 1 again and do this 25 times (but that doesn't matter here).
How do I create a loop to select cells/rows of data based on the value of a cell/column?
The loop should end once it has selected the cells because each group will be moved to a different area on the workbook.
Or is there something better than loops?