Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
compound
 
Posts: n/a
Default Is it possible with functions?


Great Day!
I have a user defined function in a cell A1 and I would like to return
value to the cell B2

For example if I have function:

Public Function MyTest(ByVal sInput As String)
Application.Range("MyRange") = sInput
End Function

If I put this function in to cell A1 and name cell B2 “MyRange” then I
get an application error.

Thank you.
Compound.


--
compound
------------------------------------------------------------------------
compound's Profile: http://www.excelforum.com/member.php...o&userid=11556
View this thread: http://www.excelforum.com/showthread...hreadid=555131

  #2   Report Post  
Posted to microsoft.public.excel.misc
Elkar
 
Posts: n/a
Default Is it possible with functions?

No, a function (user-defined or not) can only return a value to the cell that
it is used in. A Workbook SheetChange event macro may accomplish what you're
looking for, but not a function.

Its not clear what you're trying to accomplish, but why not place a formula
in B2 that performs a calculation on data in A1? Would this not give you
your desired results?

HTH,
Elkar


"compound" wrote:


Great Day!
I have a user defined function in a cell A1 and I would like to return
value to the cell B2

For example if I have function:

Public Function MyTest(ByVal sInput As String)
Application.Range("MyRange") = sInput
End Function

If I put this function in to cell A1 and name cell B2 €śMyRange€ť then I
get an application error.

Thank you.
Compound.


--
compound
------------------------------------------------------------------------
compound's Profile: http://www.excelforum.com/member.php...o&userid=11556
View this thread: http://www.excelforum.com/showthread...hreadid=555131


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
Can I get Excel to determine the line curve formula without graph. Cadelima Excel Discussion (Misc queries) 8 December 20th 05 09:57 PM
User-defined functions created in Excel 2000 fail in Excel 2003 goodguy Excel Discussion (Misc queries) 1 October 3rd 05 07:04 PM
Database functions should use criteria in formula, as 1-2-3 does 123user Excel Worksheet Functions 8 September 29th 05 08:57 PM
Are there functions that perform robust statistics in Excel? froot_broot Excel Worksheet Functions 0 August 30th 05 10:18 PM
Visible rows and functions that work tracy Excel Worksheet Functions 2 August 19th 05 05:25 AM


All times are GMT +1. The time now is 05:10 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"