Hi All,
I have what I think might be the dumbest question ever posed here, but I'm at my wits end. I have the following two if statements, both of which work individidually on their own. However, I am trying to add the first to the second as another condition, but when i do that, no matter where in the formula i try to insert it, it tells me i have entered too many arguments. I have tried adding a ",0)" to the end of formula 1, but am still getting an error.
My guess is somewhere along the line i have two many or two few parenthesis inserted, but after 4 hours of trying to troubleshoot every combination, I am giving up.
A million Schrute Bucks if you can help me consolidate these two formulas.
In the attached image, the $399k is formula in row 30 is formula 2, while the $333k in row 26 is formula 1.
1)
=IF(AND(MONTH(V$1)=MONTH($E30),YEAR(V$1)=YEAR($E30)),(INDEX($V$2:$DA$4,MATCH($G30,$I$2:$I$4,0),MATCH(V$28,$V$1:$DA$1,0))+$H30))*$A30/12*(DAY(EOMONTH(V1,0)-DAY($E30))/30)
2) =IF(AND(MONTH(V$1)=MONTH($F30),YEAR(V$1)=YEAR($F30)),-$A30*IF($G30="Sonia",INDEX($J$5:$DA$6,MATCH("GBP",$I$5:$I$6,0),MATCH(V$28,$J$1:$DA$1,0)),IF($G30="Euribor",INDEX($J$5:$DA$6,MATCH("EUR",$I$5:$I$6,0),MATCH(V$28,$J$1:$DA$1,0)),1)),
IF(YEAR(V$1)>YEAR($F30),0,
IF(YEAR(V$1)<YEAR($E30),0,
IF(AND(MONTH(V$1)<=MONTH($E30),YEAR(V$1)<YEAR($E30)),0,
IF(AND(MONTH(V$1)>=MONTH($F30),YEAR(V$1)>=YEAR($F30)),0,
IF($C30="Fixed",$A30*($D30/12),$A30*(INDEX($J$2:$DA$4,MATCH($G30,$I$2:$I$4,0),MATCH(V$28,$J$1:$DA$1,0))+$H30)/12*IF($G30="Sonia",INDEX($J$5:$DA$6,MATCH("GBP",$I$5:$I$6,0),MATCH(V$28,$J$1:$DA$1,0)),IF($G30="Euribor",INDEX($J$5:$DA$6,MATCH("EUR",$I$5:$I$6,0),MATCH(V$28,$J$1:$DA$1,0)),1))))))))
I have what I think might be the dumbest question ever posed here, but I'm at my wits end. I have the following two if statements, both of which work individidually on their own. However, I am trying to add the first to the second as another condition, but when i do that, no matter where in the formula i try to insert it, it tells me i have entered too many arguments. I have tried adding a ",0)" to the end of formula 1, but am still getting an error.
My guess is somewhere along the line i have two many or two few parenthesis inserted, but after 4 hours of trying to troubleshoot every combination, I am giving up.
A million Schrute Bucks if you can help me consolidate these two formulas.
In the attached image, the $399k is formula in row 30 is formula 2, while the $333k in row 26 is formula 1.
1)
=IF(AND(MONTH(V$1)=MONTH($E30),YEAR(V$1)=YEAR($E30)),(INDEX($V$2:$DA$4,MATCH($G30,$I$2:$I$4,0),MATCH(V$28,$V$1:$DA$1,0))+$H30))*$A30/12*(DAY(EOMONTH(V1,0)-DAY($E30))/30)
2) =IF(AND(MONTH(V$1)=MONTH($F30),YEAR(V$1)=YEAR($F30)),-$A30*IF($G30="Sonia",INDEX($J$5:$DA$6,MATCH("GBP",$I$5:$I$6,0),MATCH(V$28,$J$1:$DA$1,0)),IF($G30="Euribor",INDEX($J$5:$DA$6,MATCH("EUR",$I$5:$I$6,0),MATCH(V$28,$J$1:$DA$1,0)),1)),
IF(YEAR(V$1)>YEAR($F30),0,
IF(YEAR(V$1)<YEAR($E30),0,
IF(AND(MONTH(V$1)<=MONTH($E30),YEAR(V$1)<YEAR($E30)),0,
IF(AND(MONTH(V$1)>=MONTH($F30),YEAR(V$1)>=YEAR($F30)),0,
IF($C30="Fixed",$A30*($D30/12),$A30*(INDEX($J$2:$DA$4,MATCH($G30,$I$2:$I$4,0),MATCH(V$28,$J$1:$DA$1,0))+$H30)/12*IF($G30="Sonia",INDEX($J$5:$DA$6,MATCH("GBP",$I$5:$I$6,0),MATCH(V$28,$J$1:$DA$1,0)),IF($G30="Euribor",INDEX($J$5:$DA$6,MATCH("EUR",$I$5:$I$6,0),MATCH(V$28,$J$1:$DA$1,0)),1))))))))