@pinteam
https://1drv.ms/x/s!AiE0Si5ywRcJhK8a...Ur7oA?e=8Z087J This links an excel file on Onedrive storage. Provided here solely for studying the underlying logic, all the other usual disclaimers apply.
Somebody asked for a template - Jepp lookalike generator - for these things in a company I cared for. A page to insert into the route manuals. Guess the math still works 10 years onwards, fill the blue box and hit print, voila a sheet should come out. Won't work well in the Online Excel, need to download the file to disk. The original file contains no macros or VBA, heed any warnings about malware if shown!
The corrected altitude is calculated using a formula from Doc 8168, and the FPA needed just using ARCtang. Same as carefully explained above already, no magic.