-

2011年8月4日星期四

Excel issues with if statements?

-ok, now im trying to link to calculations on a another page, based on a cell on the current page.

here is the formula:

=IF(OR(C4="1",C4="2"),numbers!N10,

IF(OR(C4="3",C4="4"),numbers!N10,

IF(OR(C4="5",C4="6"),numbers!N10,

IF(C4=7,numbers!N10,

IF(C4="8",numbers!P10,

IF(C4="9",numbers!P10,

IF(C4="10",numbers!P10)))



if i use the formula to use N10 as a reference it will work, and if i use the formula to reference P10, it will work, but if i combine it like i have above, it will report an error. Have i hit a roadblock on this, or is there something in the code that i just dont see?I haven't built the two sheets but the 2007 version, suggests the following correction. I thought I would post this in the event you are using an older version that did not suggest the same correction. I hope this helps, If not we tried.



=IF(OR(C4="1",C4="2"),numbers!N10,

IF(OR(C4="3",C4="4"),numbers!N10,

IF(OR(C4="5",C4="6"),numbers!N10,

IF(C4=7,numbers!N10,

IF(C4="8",numbers!P10,

IF(C4="9",numbers!P10,

IF(C4="10",numbers!P10)))))))

没有评论:

发表评论