'What is limit of Nested IF statement in MS Word?

Is there any limit on how many nesting we can use in Nested IF statement in Microsoft Word?

Also, if limit can be different based on office version?



Solution 1:[1]

The nesting limit is 20 in all Word versions.

Solution 2:[2]

I know this is old, but this may help others. You only need ONE else statement at the end. There is no need to nest. Example:

{IF { MERGEFIELD LETTERCODE } = "A" "LETTER A TEXT HERE" 
}{IF { MERGEFIELD LETTERCODE } = "B" "LETTER B TEXT HERE" 
}{IF { MERGEFIELD LETTERCODE } = "C" "LETTER C TEXT HERE" 
}{IF { MERGEFIELD LETTERCODE } = "D" "LETTER D TEXT HERE" 
"ELSE DEFAULT LETTER TEXT HERE" }

I've done 80+ versions like this.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 macropod
Solution 2 GSBatch