I generate a dynamic spreadsheet from Access. It works perfect except I do my MATH in access and just pass the result to Excel.
Like this:
LColMinor contains a sum of specific data.
What I want to do is pass the formula to make the spreadsheet updateable.
HOWEVER... I use the NUMERIC reference to cells in my code, NOT the Alphanumeric.
Like:
So how do I pass a fomula based on Cells?
Here is an example of a failed attempt of mine:
Thanks in advance!
Joe
Like this:
Code:
wks.Cells(iRow, X) = LColMinor
LColMinor contains a sum of specific data.
What I want to do is pass the formula to make the spreadsheet updateable.
HOWEVER... I use the NUMERIC reference to cells in my code, NOT the Alphanumeric.
Like:
Code:
appexcel.Range(Cells(iRow, X), Cells(iRow, X)).Select
or
wks.Cells(9, 4)
So how do I pass a fomula based on Cells?
Here is an example of a failed attempt of mine:
Code:
wks.Cells(8, 9).Formula = "=Sum(Cells(" & PrevFR & "," & X & "): Cells(" & PrevLR & "," & X & "))"
which works out to
=Sum(Cells(4,9):Cells(7,9))
Thanks in advance!
Joe