http://www.flickr.com/photos/vihi/2677112781/
http://www.flickr.com/photos/vihi/2677112887/
http://www.flickr.com/photos/vihi/2677927946/
http://www.flickr.com/photos/vihi/2677927970/

Hi,

I am trying to compare different account in set intervals. Look at the pictures , maybe that will explain it.

I have a termination date for every account (Column C) and then I have Assigned Date for some accounts (Column H)

Payment ammounts and balances are to the right. I need to create a formula to return the sums of payments that have occured 30 days after the termination date (Column C) and before the assigned date( Column H)


PHP Code: 
=IF(H10<>"",IF(AND(C10+30<H10,H10>K10,K10<>""),IF(AND(N10<H10,N10<>""),IF(AND(Q10<H10,Q10<>""),IF(AND(T10<H10,Q10<>""),IF(AND(W10<H10,W10<>""),IF(AND(z10<H10,z10<>""),IF(AND(AC10<H10,AC10<>""),IF(AND(AF10<H10,AF10<>""),IF(AND(AI10<H10,AI10<>""),IF(AND(AL10<H10,AL10<>""),IF(AND(AO10<H10,AO10<>""),AP10+AM10+AJ10+AG10+AD10+AA10+X10+U10+R10+O10+L10,AM10+AJ10+AG10+AD10+AA10+X10+U10+R10+O10+L10),AJ10+AG10+AD10+AA10+X10+U10+R10+O10+L10),AG10+AD10+AA10+X10+U10+R10+O10+L10),AD10+AA10+X10+U10+R10+O10+L10),AA10+X10+U10+R10+O10+L10),X10+U10+R10+O10+L10),U10+R10+O10+L10),R10+O10+L10),O10+L10),L10),"NO PMT"),"NO ASSN FLD"


When I created the if function for a different report everything was ok. But here the list is a lot wider and I am not sure why it is not working. There is an error of some kind. I counted all the paranthesies and they were the exact number at each side.

Please help.

What is incorrect.

i tried something else,too. I recreated the formula but this time I made it shorter.

I did not include in the if conditions references to any of the columns beyond Z: that is AA/AB/AC....

and it worked.

but the question is still open,becaue I am not using all the data. why is that causing problems ??

that is the new formula:
PHP Code: 


=IF(H10<>"",IF(AND(C10+30<H10,H10>K10,K10<>""),IF(AND(N10<H10,N10<>""),IF(AND(Q10<H10,Q10<>""),IF(AND(T10<H10,Q10<>""),V10,S10),P10),M10),"NO PMT"),"NO ASSN FLD"
Thanks in advance