I am triying to create a column that shows que row index on visible rows when Excel table is filtered. This formula works:
=IF(SUBTOTALS(3,A2:A2)=0,MIN($B$1:B1)-1