I remember I was using an excel sheet to calculate the WHZ in one of my research study at graduate level. I used the reference weight for a range of specific height from the publication of A. Roberto Frisancho .
I would have to sort out my data by the heights (Ascending or descending) and input the reference weight and use a formula of Z-score (Actual weight - Reference Weight / Standard Deviation) which would determine the WHZ in a separate column.
You can get the reference weight and SD from the same source for every specific range of heights. The publication has also classified reference weight and height based on age.
In order to create an automated WHZ sheet, you need to apply a condition on the height column and define the reference weights and SD in that condition.
However, it is worth mentioning here, we always use WHO references for the CMAM activities. I have never seen any such classification of references based on age and height in WHO's publications unless they have a new publication which I am not aware of.
Hope this answers your question.