0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

先週、今週などの式

Last updated at Posted at 2023-04-11

20日締めで今月だったらtrueになる式

IF ( DAY( TODAY() ) > 20 ,TEXT( YEAR( TODAY() ) *100 + MONTH(TODAY() ) ),
IF ( MONTH(TODAY() ) = 01, TEXT( YEAR( TODAY() ) - 1) & '12' ,
TEXT( YEAR( TODAY() ) *100 + MONTH(TODAY() ) - 1)
)) = SyougoMonth__c

20日締めで今月だったらtrueになる式

CASE( MONTH(TODAY()),
1,IF ( DAY( TODAY() ) > 20 ,TEXT( (YEAR( TODAY()) -1) *100 + 12) ,TEXT( (YEAR( TODAY()) -1 ) *100 + 11) ) ,
2,IF ( DAY( TODAY() ) > 20 ,TEXT( YEAR( TODAY()) *100 + 1) ,TEXT( (YEAR( TODAY())-1 ) *100 + 12) ) ,
IF ( DAY( TODAY() ) > 20 ,TEXT( YEAR( TODAY() ) *100 + MONTH(TODAY()) -1) ,TEXT( YEAR( TODAY() ) *100 + MONTH(TODAY() ) -2) )
) = SyougoMonth__c

20日締めで今年度、昨年度、来年度のように区分をつける式

IF(AND(Nengetu__c >=
CASE(MONTH(TODAY()),
1,TEXT(YEAR(TODAY())-1) & "/04",
2,TEXT(YEAR(TODAY())-1) & "/04",
3,TEXT(YEAR(TODAY())-1) & "/04",
TEXT(YEAR(TODAY())) & "/04") ,
Nengetu__c <=
CASE(MONTH(TODAY()),
1,TEXT(YEAR(TODAY())) & "/03",
2,TEXT(YEAR(TODAY())) & "/03",
3,TEXT(YEAR(TODAY())) & "/03",
TEXT(YEAR(TODAY())+1) & "/03") ),"this",

IF(AND(Nengetu__c >=
CASE(MONTH(TODAY()),
1,TEXT(YEAR(TODAY())-2) & "/04",
2,TEXT(YEAR(TODAY())-2) & "/04",
3,TEXT(YEAR(TODAY())-2) & "/04",
TEXT(YEAR(TODAY())-1) & "/04") ,
Nengetu__c <=
CASE(MONTH(TODAY()),
1,TEXT(YEAR(TODAY())-1) & "/03",
2,TEXT(YEAR(TODAY())-1) & "/03",
3,TEXT(YEAR(TODAY())-1) & "/03",
TEXT(YEAR(TODAY())) & "/03") ),"last",

IF(AND(Nengetu__c >=
CASE(MONTH(TODAY()),
1,TEXT(YEAR(TODAY())) & "/04",
2,TEXT(YEAR(TODAY())) & "/04",
3,TEXT(YEAR(TODAY())) & "/04",
TEXT(YEAR(TODAY())+1) & "/04") ,
Nengetu__c <=
CASE(MONTH(TODAY()),
1,TEXT(YEAR(TODAY())+1) & "/03",
2,TEXT(YEAR(TODAY())+1) & "/03",
3,TEXT(YEAR(TODAY())+1) & "/03",
TEXT(YEAR(TODAY())+2) & "/03") ),"next",

"other")))
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?