Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Can I get Excel to determine the line curve formula without graph. | Excel Discussion (Misc queries) | |||
User-defined functions created in Excel 2000 fail in Excel 2003 | Excel Discussion (Misc queries) | |||
Database functions should use criteria in formula, as 1-2-3 does | Excel Worksheet Functions | |||
Are there functions that perform robust statistics in Excel? | Excel Worksheet Functions | |||
Visible rows and functions that work | Excel Worksheet Functions |