function call

  • Thread starter Thread starter magix
  • Start date Start date
M

magix

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.
 
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.
 
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.
 
You have another response at the original thread.
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.
 
I agree with Dave, Excel is not designed to handle what you are describing.
There are easier methods for assigning values to cells.
 
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top