Q:

code for communicating between a table workbook and a function workbook in excel

I'm trying to come up with a code that reads variables from two input rows (y1 and y2) and uses those in a function that returns a new value (y2') to a third row. I.e get values from a table workbook to a function workbook and return a new value to the original table workbook. By doing so I'm hoping that I don't have to create a new function worksbook/sheet for every input value. Is this possible at all?
I've been trying out both VBA and Python/xlwings, but to no luck. I'm not a programmer myself and that's prob the reason this task seems so enormous. Any help would be much appreciated!
PS a figure would probably have made the issue clearer, but as a noob I'm not allowed to post figures. Please find an explanatory image at this link location: https://db.tt/AxFG9snn

A:

Yes it is absolutely possible, i am not a professional programmer so i will try my best to explain the code to you. You just need to write a simple code in vba editor. I was in your shoes a few months ago. Here is an example. 
This code fetches input (cell A1 and B1 in Sheet1) from Book1.xlsx calculates the output and stores it back in Book1. The current/active workbook has the formula/function which is C1 =SUM(A1:B1). 
Sub Code()
' Gets input from another workbook
Dim wb1 As Workbook                                                         ' Declaring wb1 and wb2 as variable of type Workbook
Dim wb2 As Workbook

Set wb1 = Workbooks.Open("book1.xlsx")                                      'Note: In order to access data from another workbook, it should be open.
Set wb2 = ThisWorkbook                                                      'ThisWorkbook: refrence to the workbook having this code

wb2.Sheets("Sheet1").Range("A1") = wb1.Sheets("Sheet1").Range("A1")         'Access value stored in cell A1 of sheet1 in book1 and stre it in cell A1 of book2
wb2.Sheets("Sheet1").Range("B1") = wb1.Sheets("Sheet1").Range("b1")

wb1.Sheets("Sheet1").Range("C1") = wb2.Sheets("Sheet1").Range("c1")         'Store the output (cell C1 of book2) in cell C1 of book1

End Sub

You can easily do it for a range of cells and you can also reference cells in offset. I hope it helps. 

