Hi All
I am having an issue with maximum number of IF statements which i can use, i have the below formula which effectively checks if a date enterred by user in cell C9 falls in a month (the month is active and changes dependent on a year enterred), i am using two cells to identify the month, so for example
IF(AND(C9>=P7,C9<=Q7),SUM(P9:BK9),
checks to see if C9 falls between dates enterred in P7 and Q7, if it does it then sums the row from this point onwards
Can anyone recommend a better way round this as i have 24months for it check...
CODE:
IF(AND(C9>=P7,C9<=Q7),SUM(P9:BK9), IF(AND(C9>=R7,C9<=S7),SUM(R9:BK9), IF(AND(C9>=T7,C9<=U7),SUM(T9:BK9), IF(AND(C9>=V7,C9<=W7),SUM(V9:BK9), IF(AND(C9>=X7,C9<=Y7),SUM(X9:BK9), IF(AND(C9>=Z7,C9<=AA7),SUM(Z9:BK9), IF(AND(C9>=AB7,C9<=AC7),SUM(AB9:BK9), IF(AND(C9>=AD7,C9<=AE7),SUM(AD9:BK9), IF(AND(C9>=AF7,C9<=AG7),SUM(AF9:BK9), IF(AND(C9>=AH7,C9<=AI7),SUM(AH9:BK9), IF(AND(C9>=AJ7,C9<=AK7),SUM(AJ9:BK9), IF(AND(C9>=AL7,C9<=AM7),SUM(AL9:BK9), IF(AND(C9>=AN7,C9<=AO7),SUM(AN9:BK9), IF(AND(C9>=AP7,C9<=AQ7),SUM(AP9:BK9), IF(AND(C9>=AR7,C9<=AS7),SUM(AR9:BK9), IF(AND(C9>=AT7,C9<=AU7),SUM(AT9:BK9), IF(AND(C9>=AV7,C9<=AW7),SUM(AV9:BK9), IF(AND(C9>=AX7,C9<=AY7),SUM(AX9:BK9), IF(AND(C9>=AZ7,C9<=BA7),SUM(AZ9:BK9), IF(AND(C9>=BB7,C9<=BC7),SUM(BB9:BK9), IF(AND(C9>=BD7,C9<=BE7),SUM(BD9:BK9), IF(AND(C9>=BF7,C9<=BG7),SUM(BF9:BK9),"ERROR")))
Any help would be appreciated
Ali
I am having an issue with maximum number of IF statements which i can use, i have the below formula which effectively checks if a date enterred by user in cell C9 falls in a month (the month is active and changes dependent on a year enterred), i am using two cells to identify the month, so for example
IF(AND(C9>=P7,C9<=Q7),SUM(P9:BK9),
checks to see if C9 falls between dates enterred in P7 and Q7, if it does it then sums the row from this point onwards
Can anyone recommend a better way round this as i have 24months for it check...
CODE:
IF(AND(C9>=P7,C9<=Q7),SUM(P9:BK9), IF(AND(C9>=R7,C9<=S7),SUM(R9:BK9), IF(AND(C9>=T7,C9<=U7),SUM(T9:BK9), IF(AND(C9>=V7,C9<=W7),SUM(V9:BK9), IF(AND(C9>=X7,C9<=Y7),SUM(X9:BK9), IF(AND(C9>=Z7,C9<=AA7),SUM(Z9:BK9), IF(AND(C9>=AB7,C9<=AC7),SUM(AB9:BK9), IF(AND(C9>=AD7,C9<=AE7),SUM(AD9:BK9), IF(AND(C9>=AF7,C9<=AG7),SUM(AF9:BK9), IF(AND(C9>=AH7,C9<=AI7),SUM(AH9:BK9), IF(AND(C9>=AJ7,C9<=AK7),SUM(AJ9:BK9), IF(AND(C9>=AL7,C9<=AM7),SUM(AL9:BK9), IF(AND(C9>=AN7,C9<=AO7),SUM(AN9:BK9), IF(AND(C9>=AP7,C9<=AQ7),SUM(AP9:BK9), IF(AND(C9>=AR7,C9<=AS7),SUM(AR9:BK9), IF(AND(C9>=AT7,C9<=AU7),SUM(AT9:BK9), IF(AND(C9>=AV7,C9<=AW7),SUM(AV9:BK9), IF(AND(C9>=AX7,C9<=AY7),SUM(AX9:BK9), IF(AND(C9>=AZ7,C9<=BA7),SUM(AZ9:BK9), IF(AND(C9>=BB7,C9<=BC7),SUM(BB9:BK9), IF(AND(C9>=BD7,C9<=BE7),SUM(BD9:BK9), IF(AND(C9>=BF7,C9<=BG7),SUM(BF9:BK9),"ERROR")))
Any help would be appreciated
Ali