ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   [VB.NET] Inserting Relative formulas (https://www.excelbanter.com/excel-programming/372178-%5Bvbulletin-net%5D-inserting-relative-formulas.html)

RG[_3_]

[VB.NET] Inserting Relative formulas
 
Hi,

During the generation of Excel Documents with vb.net, I always get strange
errors who means nothing.
This happens every time at the moment I try to insert a relative formula.

Other functions (like inserting text, formulas like=sum(A1:B5), layout) are
going perfect.

Does somebody has a solution for me ?

These are some of my attempts:
Ws.Range(col & row).FormulaR1C1 = "(R[-8]C:R[-1]C)"
Ws.Range(col & row).FormulaR1C1 = "=SUM(R[-2]C:R[-1]C)"
App.Range(col & row).Formula = "=SUM(R[-2]C:R[-1]C)"
App.Range(col & row).FormulaR1C1 = "=R[-2]C+R[-1]C"
App.ActiveSheet.Cells(rij, 3).Formula = "=C[-1]+c12"


thx,






All times are GMT +1. The time now is 07:09 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com