Convert a letter to a number according to a dictionary

Hi,

Is there in Calc a way to automatically convert a letter to a number according to a dictionary I would input?

For example, I would input somewhere that
A: 16
B: 14
C: 12
D: 10
F: 8
and would be able to call a function that would read a letter in a given cell and transform it into the desired number in the current cell.

The goal is to transfer grades between different academic systems.

VLOOKUP() function. In your case it can be

VLookup_

Hallo
devine into a cellrange of 2 Columns and 26 Rows your desired letter | number pairs.

and use Formula for Example =VLOOKUP( "C" ; $A$1:$B$26 ; 2 ;0 )

Hello @JohnSUN and @karolus ,
Thank you for your prompt answers!
This solves my problem.