# Use if else to judge in sail software - use the title condition to judge

2022-04-23 16:26:00

My requirement here is to judge in the title （ Beginning of the year , Mid - ）, These two to judge , Set the title in the normal report .
effect ：

1、 Insert a formula into a cell

The formula is as follows ：if(versionTypeBefore=1&&versionType=1,“ Investment and capital plan of fixed investment projects “+ p l a n Y e a r B e f o r e + " ( year first ) − " + planYearBefore+"( Beginning of the year )-"+ planYear+”( Beginning of the year )”+“ Adjustment summary ”,if(versionTypeBefore=1&&versionType=3,“ Investment and capital plan of fixed investment projects “+ p l a n Y e a r B e f o r e + " ( year first ) − " + planYearBefore+"( Beginning of the year )-"+ planYear+”( Mid - )”+“ Adjustment summary ”,if(versionTypeBefore=3&&versionType=1,“ Investment and capital plan of fixed investment projects “+ p l a n Y e a r B e f o r e + " ( in period ) − " + planYearBefore+"( Mid - )-"+ planYear+”( Beginning of the year )”+“ Adjustment summary ”,if(versionTypeBefore=3&&versionType=3,“ Investment and capital plan of fixed investment projects “+ p l a n Y e a r B e f o r e + " ( in period ) − " + planYearBefore+"( Mid - )-"+ planYear+”( Mid - )”+“ Adjustment summary ”,))))

The point is to add a comma at the end , Because the comma is else It means , So you must add... At the end else, otherwise , The one in front if Judgment cannot be performed . This is the pit I encountered , In fact, that is if-else Is inseparable .

https://yzsam.com/2022/04/202204231403370959.html