Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 349
Default Create "Name" in UDF

Hi,

I want to create a UDF, and then in my VBA I create a "Name" for the calling
cell, is it possible?

E.g. =GetTotal ( my UDF will return a VALUE, as well as name "that" cell as
"SomeText")

Thanks,
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Create "Name" in UDF

Hi Peter,

A UDF returns a value to the calling cell; it cannot alter its environment.

If you want to name a cell, you will need to use an appropriate sub.


---
Regards,
Norman



"Peter" wrote in message
...
Hi,

I want to create a UDF, and then in my VBA I create a "Name" for the
calling
cell, is it possible?

E.g. =GetTotal ( my UDF will return a VALUE, as well as name "that" cell
as
"SomeText")

Thanks,



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default Create "Name" in UDF

Hi,

I can't see how you can do it directly in the function, as you can't pass
the cell as a parameter (you get a circular reference).

However you could trap the 'Worksheet_Change' event on a worksheet & set
names up depending on if the Target returned contained you type of formula
.... not what you want but it may be a work-around.

Regards,

Chris.

--
Chris Marlow
MCSD.NET, Microsoft Office XP Master


"Peter" wrote:

Hi,

I want to create a UDF, and then in my VBA I create a "Name" for the calling
cell, is it possible?

E.g. =GetTotal ( my UDF will return a VALUE, as well as name "that" cell as
"SomeText")

Thanks,

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Create Pivot Table Data with Column "Sum" rather than "count" defa Johnny_99[_2_] Excel Discussion (Misc queries) 2 January 2nd 10 03:25 PM
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
How to create a scatter chart with 2 "X" values with common "Y"s M_LeDuc Charts and Charting in Excel 2 September 13th 07 10:26 PM
cannot use "Create List" and "Share Workbook" same time Devendra Excel Discussion (Misc queries) 0 October 26th 06 06:05 AM
create links to check boxes marked "good" fair"and "bad" pjb Excel Worksheet Functions 3 April 20th 06 02:17 AM


All times are GMT +1. The time now is 04:19 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"