Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Excel – Formula to Copy Rows to Another Sheet but Skipping Columns with 0's

I have data that looks like the example below. In some places there are 0’s. I want to write a formula in a blank worksheet that will copy the data over but skip rows with 0’s.

So, in my example rows 7-18 would now be rows 1-12 and then rows 19-27 would be skipped and row 13 would be the next row without 0’s, etc. In other words, I want to copy rows and remove rows with 0’s but I do not want blank rows where the 0’s are.

enter image description here

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Try one of the followings, which should work accordingly :

=FILTER(A1:J27,BYROW(C1:J27,LAMBDA(x,OR(x>0))))

Or Using ETA LAMBDA()

=FILTER(A1:J27,BYROW(C1:J27>0,OR))

If it has to be taken from Column A onwards then:

=FILTER(A1:J27,BYROW(A1:J27,LAMBDA(x,AND(x>0))))

Or,

=FILTER(A1:J27,BYROW(A1:J27>0,AND))

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading