chicosbailbonds
New Member
- Joined
- Dec 18, 2009
- Messages
- 44
Can anyone figure out a way to shorten the amount of ifs in this formula? I'm using excel 2003 and running into the nested if issue. It basically looks to see if the value in C is Positive, negative, or zero. If it is zero it checks to see if column R & S Are also zero if they are it prints N/A if not it should take the sum of R&S divided by the sumif of what is on the MTD sheet... if the explanation will help I can go further but I don't think my explaining the formula will help. I've been banging my head on the desk all afternoon I would prefer to not have to add additional columns to split this out because I do it 4 times. Thanks in advance for your help.
=IF($C22=0,(R22+S22)/SUMIF('MTD- LP'!$A:$A,'Positions-LP'!$B22,'MTD- LP'!$J:$J),IF(($C22=0)*(R22=0)*(S22=0)),"N/A",IF($C22>0,IF(ISERROR((R22+S22)/SUMIF('MTD- LP'!$A:$A,'Positions-LP'!$B22,'MTD- LP'!$J:$J)),(R22+S22)/SUMIF('Current- LP'!$A:$A,'Positions-LP'!$B22,'Current- LP'!$I:$I),(R22+S22)/SUMIF('MTD- LP'!$A:$A,'Positions-LP'!$B22,'MTD- LP'!$J:$J)),IF(ISERROR((R22+S22)/SUMIF('MTD- LP'!$A:$A,'Positions-LP'!$B22,'MTD- LP'!$J:$J)),(R22+S22)/-SUMIF('Current- LP'!$A:$A,'Positions-LP'!$B22,'Current- LP'!$I:$I),(R22+S22)/-SUMIF('MTD- LP'!$A:$A,'Positions-LP'!$B22,'MTD- LP'!$J:$J)))))
=IF($C22=0,(R22+S22)/SUMIF('MTD- LP'!$A:$A,'Positions-LP'!$B22,'MTD- LP'!$J:$J),IF(($C22=0)*(R22=0)*(S22=0)),"N/A",IF($C22>0,IF(ISERROR((R22+S22)/SUMIF('MTD- LP'!$A:$A,'Positions-LP'!$B22,'MTD- LP'!$J:$J)),(R22+S22)/SUMIF('Current- LP'!$A:$A,'Positions-LP'!$B22,'Current- LP'!$I:$I),(R22+S22)/SUMIF('MTD- LP'!$A:$A,'Positions-LP'!$B22,'MTD- LP'!$J:$J)),IF(ISERROR((R22+S22)/SUMIF('MTD- LP'!$A:$A,'Positions-LP'!$B22,'MTD- LP'!$J:$J)),(R22+S22)/-SUMIF('Current- LP'!$A:$A,'Positions-LP'!$B22,'Current- LP'!$I:$I),(R22+S22)/-SUMIF('MTD- LP'!$A:$A,'Positions-LP'!$B22,'MTD- LP'!$J:$J)))))
Last edited: