Is there a way to automatically normalize tables in calc ?

Hello,

In calc I want to “normalize” a table.

Here is an example:
I have a table with registrant who enrolls from 1 to up to 4 participants (enrollees). It is not “normalized”, because there is e repeating column (Name Enrollee).

I want to have it normalized, such as below (cells are “transposed”):

image description

It can of course be done manually with “copy/paste transpose”.

But is there a programmatic way (function, macro) to do this ?

Is it safe to assume that you mean normalization as a Database concept? Then it is not used in your question because you are talking about spreadsheets(Calc). It is unclear from the question what you want to do. You want a new sheet with the above second table values? You want to be able to select the names of registrants from a static range of cells (which might imply some kind of “normalization”)?