Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default function call

Dave mentioned that "A function called from a cell on a worksheet can't
change the value in
another cell."

Could anyone tell me if there is any workaround to set a value in another
cell with a function called from a cell.

Thanks.
Regards.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default function call

I am not sure what it is you are trying to do. Dave gave you VBA code that
showed how to assign a value to a cell. Maybe if you could explain what you
want to do, someone could come up with something.

"magix" wrote:

Dave mentioned that "A function called from a cell on a worksheet can't
change the value in
another cell."

Could anyone tell me if there is any workaround to set a value in another
cell with a function called from a cell.

Thanks.
Regards.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default function call

I'm tying to do this..

Create a function, example:

Function ABC(S1 As String, S2 As String) As String
...
...
...
' set value to another cell.
ActiveSheet.Range("D1").value = "Test"
End Function

In excel, I will run this formula in cell A1 which has "=ABC(B1, C1)"

In that case, ActiveSheet.Range("D1").value = "Test" will NOT work.

"JLGWhiz" wrote in message
...
I am not sure what it is you are trying to do. Dave gave you VBA code that
showed how to assign a value to a cell. Maybe if you could explain what
you
want to do, someone could come up with something.

"magix" wrote:

Dave mentioned that "A function called from a cell on a worksheet can't
change the value in
another cell."

Could anyone tell me if there is any workaround to set a value in another
cell with a function called from a cell.

Thanks.
Regards.





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default function call

You have another response at the original thread.

magix wrote:

Dave mentioned that "A function called from a cell on a worksheet can't
change the value in
another cell."

Could anyone tell me if there is any workaround to set a value in another
cell with a function called from a cell.

Thanks.
Regards.


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default function call

I agree with Dave, Excel is not designed to handle what you are describing.
There are easier methods for assigning values to cells.

"magix" wrote:

I'm tying to do this..

Create a function, example:

Function ABC(S1 As String, S2 As String) As String
...
...
...
' set value to another cell.
ActiveSheet.Range("D1").value = "Test"
End Function

In excel, I will run this formula in cell A1 which has "=ABC(B1, C1)"

In that case, ActiveSheet.Range("D1").value = "Test" will NOT work.

"JLGWhiz" wrote in message
...
I am not sure what it is you are trying to do. Dave gave you VBA code that
showed how to assign a value to a cell. Maybe if you could explain what
you
want to do, someone could come up with something.

"magix" wrote:

Dave mentioned that "A function called from a cell on a worksheet can't
change the value in
another cell."

Could anyone tell me if there is any workaround to set a value in another
cell with a function called from a cell.

Thanks.
Regards.








  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 63
Default function call

magix,
Is there any reason you can't simply use two formulas, one in the
first cell, and another in the second cell setting a value based on
the first cell?
Carl.

On May 12, 6:34 pm, "magix" wrote:
Dave mentioned that "A function called from a cell on a worksheet can't
change the value in
another cell."

Could anyone tell me if there is any workaround to set a value in another
cell with a function called from a cell.

Thanks.
Regards.



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
Call Sub from Function? G Lykos Excel Programming 1 November 23rd 05 06:48 AM
How do I call this function? vrk1 Excel Programming 1 June 18th 05 01:05 AM
how i can call the function reneabesmer Excel Worksheet Functions 2 May 2nd 05 12:13 PM
call a function from VBA Adam Excel Programming 2 March 15th 05 10:17 AM
call function sirron Excel Programming 1 August 26th 03 03:39 PM


All times are GMT +1. The time now is 07:27 PM.

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"