Here is a formula I insert into cell:
sheet.Cells[0,0].Formula = “=H7*(1+IF(P7=$L$3,$M$3,(IF(P7=$L$4,$M$4,0))))”;
And here is what I get in this cell in Excel:
=H7*(1+IF(P7=’$M$4’(),’$M$4’(),(IF(P7=’$M$4’(),’$M$4’(),0))))
Does anybody know why I get this?
Thanks in advance
Could you tell me why you need absolute reference?
Please try to change your code to :
sheet.Cells[0,0].Formula = “=H7*(1+IF(P7=L3,M3,(IF(P7=L4,M4,0))))”;
Yes, relative references work fine…
On my worksheet I have datagrid starting from row 5 and a couple of cells with static data above this row.
In this exapmle H7 and P7 cells come from datagrid, but L3,M3,L4,M4 are static data cells.
And when I sort my grid by column, references to L3,M3,L4,M4 are getting broken
Is there any chance to get absolute referencing working?
I will work on this issue right now. It will be available before the start of next week.
Hi,
This issue is solved. Please download the latest hotfix and have a try.
I thought I would bump this three year old thread, as I encountered a similar problem.
please delete my above post. Somehow I didn’t load the entire thread, just the first post.