excel_lisa
New Member
- Joined
- Apr 17, 2021
- Messages
- 5
- Office Version
- 365
- Platform
- MacOS
Hi,
I want to write a formula that computes the normalised Gibbs entropy, which is computed as follows:
The values that I want to test this for are located in column Z, AD, AH, AL, AP, AT, AX, ..... CL etc. so 3 columns are skipped every time.
I want to test for values 0 - 10.
I already wrote a code to test this formula for value '1', which is as follows:
=(COUNTIFS(Z3;1;AD3;1;AH3;1;AL3;1;AP3;1;AT3;1;AX3;1;BB3;1;BF3;1;BJ3;1;BN3;1;BR3;1;BV3;1;BZ3;1;CD3;1;CH3;1;CL3;1)/U3)*(IFERROR(LN(COUNTIFS(Z3;1;AD3;1;AH3;1;AL3;1;AP3;1;AT3;1;AX3;1;BB3;1;BF3;1;BJ3;1;BN3;1;BR3;1;BV3;1;BZ3;1;CD3;1;CH3;1;CL3;1)/U3);0))/LN(U3)
The only way I can think of computing the normalised Gibbs entropy is repeating this formula for each value from 0 to 10 as a criterion in the COUNTIFS function, and then compute the Sum of all outcomes and multiply by -1.
My Dataframe is 23000 rows so I think my Excel will also crash if I try to execute such a large formula.
Is there a smarter way to do this so that I won't have to write this formula 10 more times and so that the formula is more simple and compact?
Thank you in advance!
Lisa
P.S. If you know a way to do this in Python, please let me know as well
I want to write a formula that computes the normalised Gibbs entropy, which is computed as follows:
The values that I want to test this for are located in column Z, AD, AH, AL, AP, AT, AX, ..... CL etc. so 3 columns are skipped every time.
I want to test for values 0 - 10.
I already wrote a code to test this formula for value '1', which is as follows:
=(COUNTIFS(Z3;1;AD3;1;AH3;1;AL3;1;AP3;1;AT3;1;AX3;1;BB3;1;BF3;1;BJ3;1;BN3;1;BR3;1;BV3;1;BZ3;1;CD3;1;CH3;1;CL3;1)/U3)*(IFERROR(LN(COUNTIFS(Z3;1;AD3;1;AH3;1;AL3;1;AP3;1;AT3;1;AX3;1;BB3;1;BF3;1;BJ3;1;BN3;1;BR3;1;BV3;1;BZ3;1;CD3;1;CH3;1;CL3;1)/U3);0))/LN(U3)
The only way I can think of computing the normalised Gibbs entropy is repeating this formula for each value from 0 to 10 as a criterion in the COUNTIFS function, and then compute the Sum of all outcomes and multiply by -1.
My Dataframe is 23000 rows so I think my Excel will also crash if I try to execute such a large formula.
Is there a smarter way to do this so that I won't have to write this formula 10 more times and so that the formula is more simple and compact?
Thank you in advance!
Lisa
P.S. If you know a way to do this in Python, please let me know as well