SOLVED

Excel Offset Function: Calculation Result Inconsistency Problem

Copper Contributor

I ran across this problem when I was doing =average(offset()) calc. The two "average(offset())" functions generate different results. The only difference in the two functions are the optional parameter [height] - cell "C16" vs “N16”, where "C16" and "N16" both have numerical value of 8. 

 

I really have no idea why these 2 functions generate difference results. Anyone please help? Many thanks! 

 

Spreadsheet attached. 

 

 

1.PNG

3 Replies
best response confirmed by Divade (Copper Contributor)
Solution

@Divade 

Though this may not justify this behavior, the calculation in N16 involves decimal numbers and that is influencing the height in the offset function in some way. The offset function which uses N16 returns the range CT!$F$3:$F$9 whereas the offset function which uses C16 returns the range CT!$F$3:$F$10, you will know this if you Evaluate both the formulas and the strange thing is, both C16 and N16 are evaluated as 8.

 

If I use =AVERAGE(OFFSET(CT!$F$3,0,0,INT(N16),1))/100, I get the same output as returned by the formula using C16.

 

Interesting thing is, the formula =C16=N16 is evaluated as true so something strange is happening in the background and I have no idea about that.

@Subodh_Tiwari_sktneer 

Yeah that's the decimal that affects the height! Now I know at least how to improve the formula. Many thanks for your help :) 

@Divade 

You're welcome! Glad you found it helpful.

 

Btw if your calculation in N16 allows, you may change the formula in N16 itself to the following one and that will stop the inconsistent behavior of Offset function.

=INT(WL_Num*C4*C10)

1 best response

Accepted Solutions
best response confirmed by Divade (Copper Contributor)
Solution

@Divade 

Though this may not justify this behavior, the calculation in N16 involves decimal numbers and that is influencing the height in the offset function in some way. The offset function which uses N16 returns the range CT!$F$3:$F$9 whereas the offset function which uses C16 returns the range CT!$F$3:$F$10, you will know this if you Evaluate both the formulas and the strange thing is, both C16 and N16 are evaluated as 8.

 

If I use =AVERAGE(OFFSET(CT!$F$3,0,0,INT(N16),1))/100, I get the same output as returned by the formula using C16.

 

Interesting thing is, the formula =C16=N16 is evaluated as true so something strange is happening in the background and I have no idea about that.

View solution in original post