Trying to access an Ancestor cell (mostly grandparents)

I have struggled grasping how Ancestors works. I have the data below. Each Store # has about 50 'steps' under it, with a few Children that have Children. I want every row to contain the store number of its top-most parent. So, the level 1 is easy enough, it's just the [Store #]@row. Works great.

The level 2 is also easy - PARENT(Store #]@row). Works great.

I can't figure out the children of level 2. Or how to make it one formula that would work for all three. (Though I think I could figure that out with IF statements, if I could get the grandchildren to work).

Still new at SmartSheet, and would really appreciate any insights!

Thanks in advance.



Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!