![]() |
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. |
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. |
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. |
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 |
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. |
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. |
All times are GMT +1. The time now is 06:55 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com