Please attach your Prime and excel worksheets, so we may be able to help you.
Success!
Luc
As Prime is reading the worksheet from top to down, I don't think that its possible to write back the result to the very same Excel component.To do this you would have to turn the component into some sort of function which, as far as I know, is not possible.
But of course you always can read in an external Excel file with READEXCEL, make your calculations and after that write back the result using WRITEEXCEL to the very same Excel file. But this also means that your Prime file would not be self-contained and you have to deal with two files, Prime and Excel.
I tend to agree with Werner. One idea is that a global definition might work to rewrite variables. But I can't seem to get it to work (in the 5 minutes I devoted to it.) Apparently you can't use global definitions inside of programs.
I don't think you can define a global variable as a calculation using a non-global variable. (Nice idea, though!)
Long ago (really long, circa 1995) there was a Mathcad plug-in for EXCEL (you inserted your Mathcad sheet as a component into the EXCEL sheet. Then, using the scripting in EXCEL you could paste data into Mathcad and extract computation results. Mathcad used to have inputs (IN0, IN1, etc) and outputs (OUT0, Ozut1, etc) to define where things came in and were extract3ed from.
That capability disappeared several EXCEL iterations ago, and I don't think Prime would support it anyway. There still might be a way to script this in version 15, but it would take someone with more knowledge than I.
Thanks for your comment(s). I suspected there was no current way to create a dynamic loop between Mathcad and an excel component where you could send values back and forth as required. But since I don’t consider myself a Mathcad expert I figured I would ask more knowledgeable users. I did try to use a global definition but the program would not permit that. I guess you have to keep creating copies of the excel component to continue your calculations top-down, as necessary.
Thanks