Why not just use Pivot Table(s) with Type as a Report Filter and remaining fields set up accordingly (with No. as Row Field so as to generate unique listings)

Doing the same with formulae seems a little like reinventing the wheel to me.