Help with formula to check the lowest hierarchy row per branch where FX = 1

I'm trying to create a formula in Smartsheet that checks the box only for the lowest hierarchy row in each branch where the FX column shows "1".
- Column "A" represents the hierarchy level.
- Column "FX" contains the FX rate, and I only want to check rows where
FX = 1
.
🔹 The checkbox should be marked only for the lowest row in each branch where FX = 1
.
🔹 If a parent has FX = 1
, it should only be checked if no lower child in that branch also has FX = 1
.
🔹 The formula should work independently for each branch of the hierarchy.
I've tried using ChatGPT, but the formulas provided either:
❌ Check all rows where FX = 1
, or
❌ Only check the lowest child in the entire sheet rather than per branch.
I'm attaching a picture of what I want the result to look like.
Any and all help is greatly appreciated! Thank you! 🙏
Jessica Thour
Global Financial Account Manager, Securitas
Global Security & Safety
Answers
-
You will need a helper column (called "Helper" in this example) that outputs the branch on every child row. If your branches are the parent row, you would use something along the lines of:
=PARENT([Column Name]@row)
Then you would need an auto-number column (called "Auto" in this example) and a text number column (called "Row" in this example) containing the following column formula:
=MATCH(Auto@row, Auto:Auto, 0)
Finally the formula to check the box would be…
=IF(COUNT(CHILDREN(Auto@row)) = 0, IF(Row@row = MAX(COLLECT(Row:Row, Helper:Helper, @cell = Helper@row, FX:FX, @cell = 1)), 1))
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 67.1K Get Help
- 449 Global Discussions
- 154 Industry Talk
- 504 Announcements
- 5.4K Ideas & Feature Requests
- 85 Brandfolder
- 156 Just for fun
- 80 Community Job Board
- 513 Show & Tell
- 34 Member Spotlight
- 2 SmartStories
- 308 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!