Labeling the same numbers with some "if" function?

I even don’t find a good name for my question.
See attachment table with a citation below:
If a number in the grey column (X) is equal to one in a coloured column (A-E), I want the corresponding number of the black cell in the pale coloured columns.

Labeling.ods (29.6 KB)

thats fine! … and now you should edit your Question, and attach a sample.ods

OK, you are right. The attachment is now OK (with my old trials with sorting).
Excuse for not finding the way to put an attachment.
(Mag ook in’t nederlands beantwoord worden).
Bedankt op voorhand
Thanks in advance
Patrick
Labeling.ods (28.0 KB)

Hallo
Start in D11 with Formula:

=IFNA(INDEX( $B$2:$B$9 ; MATCH( $B11 ; D$2:D$9 ; 0)) ; "" )

and pull to the right and down

To Karolus,
WAW it did the job. Marvelous.
But I hate it when repairing something, I didn’t understand why (sometimes it happens)!
My questions are more to learn than to solve (in fact both).
=IFNA(INDEX( $B$2:$B$9 ; MATCH( $B11 ; D$2:D$9 ; 0)) ; "" )
So please some step by step explanation.
For other solvers: sometimes there are different solutions (this one is very elegant in One short rule!).

Open The LibreOffice Help Window, then search for MATCH, INDEX and IFNA.

Your “help” function helps. But an explanation (even it’s quadruple) helps also. So why
IFNA
INDEX
MATCH ?
But for me no problem(s).
I love popularization of sciences.
“If you can’t explain it to your mother, perhaps it’s not true”
No need to explain to those who understand!

There are many articles on spreadsheet functions on internet. If you are stuck on something, it is sometimes easier to search for those terms but substitute Excel for Calc, so searching for excel index match the first result is https://exceljet.net/articles/index-and-match but there are many other results.

Most of the time you will get at least an explanation. Just sometimes Excel is not the same as Calc

Yes, the Exceljet Help explains it in a more human way (in my opinion). Thanks for the hint, it’s usefull for other functions too.

That is most definitely not Excel help. I’d give you a link to help for my version of Excel 2010 but Microsoft took that away. Those are third party sites interested in helping others and probably also in promoting their paid services.

You can also search using Calc instead of Excel but the same function names and you will get results for Excel too.