How it works...

The first three measures, Confidence Value, Precision Valueand Proportion Valuesimply capture the current value selections from our tables, R11_2TailZScores, R11_Precision, and R11_Proportion respectively. This is done by using the SELECTCOLUMNS function. As part of the SELECTCOLUMNS function, we provide default values for each of these measures.

To calculate our Sample Size measure, we first must determine the corresponding Z-Score for our selected Confidence Value. This is done using the LOOKUPVALUE function. Once we have our Z-Score, we simply need to plug our measures into the formula for computing the sample size to arrive at the required sample size for the input values we have selected.