Way to simplify dependent dropdown formula? (three dropdowns, two dependant)

Hello everyone! I’m making a table of contents for a book app. I have three dropdown lists: Part, Chapter, and Section. I did set page variables for these three dropdown values.


Chapter is dependent dropdown of Part, and Section is dependent dropdown of Part & Chapter.
Ex) Part 1 has only two chapters. Part 2 has only seven chapters
Ex) Part 1 && Chapter 1 has two sections. Part 2 && Chapter 4 has four sections.

I used the IF formula and got it working, However, it is too long!!! Do you have any tips how to make this formula more simple or another way to achieve the same result?