ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How do I define a Format Cell Number Category (https://www.excelbanter.com/excel-programming/325004-how-do-i-define-format-cell-number-category.html)

JimM

How do I define a Format Cell Number Category
 
Maybe someone can give me a reference to how I can define a new Category in
the Format Cell dialogue Number tab and how to create equation functions.

What I want to do is develop an add-in to Microsoft Office Excel 2003 using
C# or VB.NET. In the add-in I need to do two items:

1) I need to define formatting categories. An example would be to format a
floating point number into either a latitude (dd:mm:ss.sssss [N|S}) or a
longitude (ddd:mm:ss.sssss [E|W]).

2) The other item I need to accomplish is to add functions to the list of
available functions. For example to compute the azimuth from station1
defined by latitude, longitude, and elevation, to another station.

Regards,

JimM

david mcritchie

How do I define a Format Cell Number Category
 
Hi Jim,

72° 14' 32" -- Displaying Latitude & Longitude, code as time by dividing degrees by 24 to appear as hours, and format the cell as
[h]° mm' ss\" under Format|Custom where the degree symbol is typed ALT+0176 on the numeric keypad.

Formatting cannot do a subtraction if you have to do that for [S],
pardon my ignorance for not know how Southern Latitudes are coded.

Chip Pearson probably has more information:
http://www.cpearson.com/excel/latlong.htm

Nautical Waypoints, example file, "great circle & rhumb line" by Vedran Cetkovic
http://groups.google.com/groups?selm...GP10.phx.gb l
---
HTH, ( http://www.mvps.org/dmcritchie/rexx/htm/symbols.htm )
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"JimM" wrote in message ...
Maybe someone can give me a reference to how I can define a new Category in
the Format Cell dialogue Number tab and how to create equation functions.

What I want to do is develop an add-in to Microsoft Office Excel 2003 using
C# or VB.NET. In the add-in I need to do two items:

1) I need to define formatting categories. An example would be to format a
floating point number into either a latitude (dd:mm:ss.sssss [N|S}) or a
longitude (ddd:mm:ss.sssss [E|W]).

2) The other item I need to accomplish is to add functions to the list of
available functions. For example to compute the azimuth from station1
defined by latitude, longitude, and elevation, to another station.

Regards,

JimM




JimM

How do I define a Format Cell Number Category
 
I knew how to use the custom category to display the latitude and longitude,
but this is not fulfilling the end user's requirement. I want to add a new
categories to the list, like latitude, longitude, azimuth, Earth Centered
Earth Fixed (x,y,z), UTM, and others. I was also hoping to use the new
categories to validate the user's input. For example defining a latitude of
90:30:00 N is an error, latitude range from 00:00:00 to 90:00:00 N or
90:00:00 S. So the custom formatting does not help.

So is there a way to create an add-in to add categories?

JimM

"David McRitchie" wrote:

Hi Jim,

72° 14' 32" -- Displaying Latitude & Longitude, code as time by dividing degrees by 24 to appear as hours, and format the cell as
[h]° mm' ss\" under Format|Custom where the degree symbol is typed ALT+0176 on the numeric keypad.

Formatting cannot do a subtraction if you have to do that for [S],
pardon my ignorance for not know how Southern Latitudes are coded.

Chip Pearson probably has more information:
http://www.cpearson.com/excel/latlong.htm

Nautical Waypoints, example file, "great circle & rhumb line" by Vedran Cetkovic
http://groups.google.com/groups?selm...GP10.phx.gb l
---
HTH, ( http://www.mvps.org/dmcritchie/rexx/htm/symbols.htm )
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"JimM" wrote in message ...
Maybe someone can give me a reference to how I can define a new Category in
the Format Cell dialogue Number tab and how to create equation functions.

What I want to do is develop an add-in to Microsoft Office Excel 2003 using
C# or VB.NET. In the add-in I need to do two items:

1) I need to define formatting categories. An example would be to format a
floating point number into either a latitude (dd:mm:ss.sssss [N|S}) or a
longitude (ddd:mm:ss.sssss [E|W]).

2) The other item I need to accomplish is to add functions to the list of
available functions. For example to compute the azimuth from station1
defined by latitude, longitude, and elevation, to another station.

Regards,

JimM






All times are GMT +1. The time now is 06:45 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com