View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bill Renaud[_2_] Bill Renaud[_2_] is offline
external usenet poster
 
Posts: 117
Default loop through a column on a workbook copying data on each row to another workbook, then copy data back to the original workbook

Could you simply add a user-defined function in the workbook that has the
data in columns E and G?
In other words, insert a module into the workbook, then add a function like
the following:

Public Function MyCalculation(ValueE, ValueG) as double
MyCalculation = 25.4 * ValueE + 1000. * ValueG 'Or whatever the math
function is.
End Function

If you do not want to add the user-defined function in the workbook that has
the data, then the function could be left in another workbook. After
entering the formula in column K and filling down the worksheet, copy and
pastespecial the values to eliminate the link to the workbook with the
uwer-defined function.

Maybe your function is too complicated for this or uses other lookup tables,
etc.
--
Regards,
Bill