# Transverse Mercator Projection formula for WGS84 to UTM zone40N (32640)

I want to convert Lat Long (in WGS84) to UTM zone40N (EPSG::32640) in Excel. So I'm creating a macro for it by following the EPSG Guidance Note 7, part 2.

I'm following the JHS Formula for Transverse Mercator mentioned in page 52 and the examples after it. It seams easy to just calculate the constants for my area and put them in the formula.

The info I have now is: (reference )

``````Latitude of Origin (Lat0) = 0
Longitude of Origin (Lng0) = 57
Scale of factor = 0.9996
False Easting= 500,000
False Northing= 0
``````

To calculate the first constant I have the formula

``````QO = asinh(tan(LatO)) – [e atanh(e sin(LatO))]
``````

And the later constants can be calculated from it, But to calculate Q0, I don't know the values 'a' and 'e'.

In the example 'a' and 'e' are calculated as a parameter of the ellipsoid used for Projected Coordinate Reference System OSGB 1936. I'm assuming the values will be different for my projection system.