Hi everyone,
I've created a nested IF statements that exceed 20+ that bypasses the 7 IF statement limitation with the use of &. Now I am though running into the error message stating I've reached the cell text limit stating: Formula is too long. May I get your help on adjusting my formula to not run into this message, I've thought about using Index and matching but not really sure on how to set it up based on my data. Here is the formula I am currently running into the issue with. Thank you for your help in advance!
=(IF($B$2=1,SUM(C175:C192),IF($C$2=1,SUM(D175:D192),IF($B$2=2,SUM(E175:E192),IF($C$2=2,SUM(F175:F192),IF($B$2=3,SUM(G175:G192),IF($C$2=3,SUM(H175:H192),IF($B$2=4,SUM(I175:I192),"")))))))&IF($C$2=4,SUM(J175:J192),IF($B$2=5,SUM(K175:K192),IF($C$2=5,SUM(L175:L192),IF($B$2=6,SUM(M175:M192),IF($C$2=6,SUM(N175:N192),IF($B$2=7,SUM(O175:O192),IF($C$2=7,SUM(P175:P192),"")))))))&IF($B$2=8,SUM(Q175:Q192),IF($C$2=8,SUM(R175:R192),IF($B$2=9,SUM(S175:S192),IF($C$2=9,SUM(T175:T192),IF($B$2=10,SUM(U175:U192),IF($C$2=10,SUM(V175:V192),IF($B$2=11,SUM(W175:W192),"")))))))&IF($C$2=11,SUM(X175:X192),IF($B$2=12,SUM(Y175:Y192),IF($C$2=12,SUM(Z175:Z192),IF(G2=1,SUM(C197:C214),IF(H2=1,SUM(D197:D214),IF(G2=2,SUM(E197:E214),IF(H2=2,SUM(F214),"")))))))&IF(G2=3,SUM(G197:G214),IF(H2=3,SUM(H214),IF(G2=4,SUM(I197:I214),IF(H2=4,SUM(J197:J214),IF(G2=5,SUM(K197:K214),IF(H2=5,SUM(L197:L214),IF(G2=6,SUM(M197:M214),"")))))))&IF(H2=6,SUM(N197:N214),IF(G2=7,SUM(O197:O214),IF(H2=7,SUM(P197:P214),IF(G2=8,SUM(Q197:Q214),"")))))+0
Bookmarks