Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Enumeration List to appear in spreadheet 1

Status
Not open for further replies.

JTBorton

Technical User
Jun 9, 2008
345
DE
Quick question: (Excel 2003)
Is it possible to make an enumeration list appear in the spreadsheet when a user calls a user-defined function?

Example:
=RelativeVolatility(Compound, HKref, TdegC)
where the compound of interest and the reference heavy key are enumeration lists
NHexane = 0
NOctane = 1
NDecane = 2
OleicAcid = 3

When calling the function from the VBE the enum list will appear. Is it possible to make this list appear from the worksheet? The only options I can see are either A) make the user provide the integer equivalents, or B) make the Compound and HKref arguments a string and use a look-up function to assign the correct enum (which defeats the purpose of an enum).

-JTBorton
Well, You can try banging your head against the wall, but you just end up with lost-time injuries and damaged equipment. [M. Passman]
 


Hi,

A UDF used on a sheet can ONLY return data to the CELL in which it is called. It cannot affect any other cell in any way.

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Thanks for the comments guys, but I guess I was not clear in what I am asking.

When I type a formula into a cell, such as =SUM(... a list of arguments appears telling the user what that formula needs. I am looking for a way to provide the user with this list of arguments when they use my formula. I would especially like for some sort of intellisense to appear (as they are typing in the formula) to show the user what arguments are available for the enumeration variables.

I am in no way trying to change other cells or print the enumeration list to the sheet. I apologize for the lack of clarity.

-JTBorton
Well, You can try banging your head against the wall, but you just end up with lost-time injuries and damaged equipment. [M. Passman]
 



Just use the Insert > Function feature!

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top