Hi all,
I have the following data:
[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]12345[/TD]
[TD]Parent[/TD]
[TD]10[/TD]
[TD]#Div/0[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]12345A[/TD]
[TD]Child[/TD]
[TD]5[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]12345B[/TD]
[TD]Child[/TD]
[TD]10[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]12345C[/TD]
[TD]Child[/TD]
[TD]20[/TD]
[TD]20[/TD]
[/TR]
</tbody>[/TABLE]
I am trying to write a formula for column D which takes the average of the child SKUs, however, I keep getting #Div/0.
Formula in column D:
=IF(B1="Parent",AVERAGEIFS(C:C,A:A,left(A1,5),B:B,"Child"),C1)
All data in Column A is TEXT and must remain so.
Some troubleshooting has shown that the "A:A,Left(A1,5)" criteria is causing the error, but I can't understand why......
Any thoughts on what is going on here and how to fix?
Thanks
I have the following data:
[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]12345[/TD]
[TD]Parent[/TD]
[TD]10[/TD]
[TD]#Div/0[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]12345A[/TD]
[TD]Child[/TD]
[TD]5[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]12345B[/TD]
[TD]Child[/TD]
[TD]10[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]12345C[/TD]
[TD]Child[/TD]
[TD]20[/TD]
[TD]20[/TD]
[/TR]
</tbody>[/TABLE]
I am trying to write a formula for column D which takes the average of the child SKUs, however, I keep getting #Div/0.
Formula in column D:
=IF(B1="Parent",AVERAGEIFS(C:C,A:A,left(A1,5),B:B,"Child"),C1)
All data in Column A is TEXT and must remain so.
Some troubleshooting has shown that the "A:A,Left(A1,5)" criteria is causing the error, but I can't understand why......
Any thoughts on what is going on here and how to fix?
Thanks
Last edited: