Can someone please help to get the below output with the given conditions
Start Month | End Month | Start Year | End Year | Period | Conditions |
Jan | Jan | 2023 | 2023 | Jan | if the month and year are same then "Start Month" |
Feb | Mar | 2023 | 2023 | Feb - Mar | if the months are different but the years are same then "Period" = Feb - Mar |
Mar | Mar | 2023 | 2024 | Mar 2023 -Mar 2024 | if the months are same but the years are different then "Period" = Mar 2023 -Mar 2024 |
Jan | Feb | 2023 | 2024 | Jan 2023 - Feb 2024 | if the months are different and the years are also different then "Period" = Jan 2023 - Feb 2024 |
Solved! Go to Solution.
Hi @lumjingbki
Step 1: Input
Step 2:
Step 3:
IF [Start Year]=[End Year] AND [Start Month]=[End Month]
THEN [Start Month]
ELSEIF [Start Year]=[End Year] AND [Start Month]!=[End Month]
THEN [Start Month]+" - "+[End Month]
ELSEIF [Start Year]!=[End Year] AND [Start Month]=[End Month]
THEN [Start Month]+" "+[Start Year]+" - "+[End Month]+" "+[End Year]
ELSEIF [Start Year]!=[End Year] AND [Start Month]!=[End Month]
THEN [Start Month]+" "+[Start Year]+" - "+[End Month]+" "+[End Year]
ELSE ""
ENDIF
Many thanks
Shanker V
@lumjingbki
Maybe you can try with the Formula tool with IF Then conditional statement?