I'm creating a user form where the user can enter latitude and longitude in either Deg/Min/Sec format or Decimal Degrees.
To go from decimal degrees into Deg/Min/Sec I need to do the following
A=Decimal Degrees (Single)
X=Degrees (Integer)
Y=Minutes (Integer)
Z=Seconds (Single)
X = Integer(A) <-- I need to cast A as an integer or truncate it. Not sure how to do this in VBA.
Y = Integer[( A - X ) * 60] <-- Again, needs to be cast as an integer
Z = {[( A - X ) * 60] - Y} * 60
I didn't see a native truncate function in Excel and in the past I've always used Left() or Right()
How would y'all do this?
Bookmarks