Relation between altimeter setting (QNH) formula and the barometric formula
Formula 33a (from the US Standard Atmosphere 1976 document you quote) gives you the pressure at a specific altitude in the U.S. Standard Atmosphere, and corresponds closely to airport/station level pressure in met reports (it corresponds exactly when the real atmosphere has the same characteristics as the Standard Atmosphere). An altimeter setting/QNH is essentially a pressure at sea level (and will be 29.92&quot;Hg/1013.2HPa when the real atmosphere matches the Standard Atmosphere, no matter what elevation the airport is).
see the weather.gov definitions here
So the two formulas (33a, and the weather.gov formula you quote) do not give the same thing.
It would be interesting to know why you need to calculate an altimeter setting, as opposed to getting it from met reports. The setting provided in met reports is a value calculated from the measured station level pressure, and this calculation is actually non-trivial.
Beware the frequently-used rule-of-thumb of 27 feet being equal to 1 HPa on an altimeter is only an approximation, and one which only &quot;works&quot; for low elevations/altitudes.