Hi, cs389!
I assume you have two title rows and that you've changed the formula to:
=MOD(ROW()-2,6)
in order to get 3, 9, ... when you filter column B for value 1.
I'll tell what I did as I get the values 1, 2, ... that you want to obtain.
Column A:
A1 : title 1
A2 : title 2
A3:AXXX : original data (XXX = last filled)
Column B:
B3:BXXX : =MOD(ROW()-2,6)
Select whole sheet, Data tab, Filter
Filter column B for <>1
Select entire filtered rows from YYY:ZZZ (YYY = first filtered, ZZZ = last filtered)
Right click on row numbers, "Eliminar filas" (I guess in english should be "Erase or remove or delete row")
Remove filter
... and you'd get 1, 2, ... on column B.
Just advise and upload a sample file if you can't manage to handle it.
Regards!