各IF()
ブロックの「false」セクションに条件をネストするだけです。
簡単な例として、2か月間しかなかったとします。概念的には、あなたの式は次のようになります。
以下の1行の式に変換
IF([Month (Calculated)]="11", // if the column equals 11...
"November", // then display "November"
IF([Month (Calculated)]="12", // otherwise... if the column equals 12
"December", // then display "December"
"No date" // otherwise... display "No date"
)
)
:
IF([Month (Calculated)]="11","November",IF([Month (Calculated)]="12", "December","No date"))
今だけすべての12ヶ月間にそのアプローチを拡張し、次のような式を取得します:
IF([Month (Calculated)]="1", "January", IF([Month (Calculated)]="2", "February", IF([Month (Calculated)]="3", "March", IF([Month (Calculated)]="4", "April", IF([Month (Calculated)]="5", "May", IF([Month (Calculated)]="6", "June", IF([Month (Calculated)]="7", "July", IF([Month (Calculated)]="8", "August", IF([Month (Calculated)]="9", "September", IF([Month (Calculated)]="10", "October", IF([Month (Calculated)]="11", "November", IF([Month (Calculated)]="12", "December", "No date"))))))))))))
残念ながら、その数式は、計算された列の数式の255文字の制限を超えています。その制限を回避するために、追加の計算列を使用して、数式をより小さな部分に分割することができます。
次のようにあなたがそれを壊すかもしれない方法の例は次のとおりです。
計算列1:
IF([Month (Calculated)]="7","July",IF([Month (Calculated)]="8","August",IF([Month (Calculated)]="9","September",IF([Month (Calculated)]="10","October",IF([Month (Calculated)]="11","November",IF([Month (Calculated)]="12", "December",[Calculated Column 2]))))))
(末尾の[Calculated Column 2]
への参照を注意してください。)
計算列2 :
IF([Month (Calculated)]="1","January",IF([Month (Calculated)]="2","February",IF([Month (Calculated)]="3","March",IF([Month (Calculated)]="4","April",IF([Month (Calculated)]="5","May","No date")))))