INDEX/MATCH only on rows that are not children
Hi there - I want to report an INDEX/MATCH result only on rows that are not children.
Here's my formula, any thoughts on how I can get it so I don't see "#NO MATCH" on the child rows?
=INDEX({ Nickname}, MATCH([SITE ID]@row, {Master | SITE ID}, 0))
Here's a screenshot of my sheet:
Best Answer
-
Hey @Beth Fantozzi 1
There's a couple of ways to do what you need.
The IFERROR function is a way to mask an error message. It allows you to write whatever you would like in a cell to replace the error message, including a blank, or run alternate formulas. Notice your entire formula is wrapped within the IFERROR function followed by what you want the IFERROR to do if an error is encountered.
=IFERROR(INDEX({ Nickname}, MATCH([SITE ID]@row, {Master | SITE ID}, 0)),"")
The other handy formula is to differentiate Parent rows from Child rows. This is critical if the Parent row is using one formula while a Child row uses an alternate formula.
=IF(COUNT(CHILDREN())>0, INDEX({ Nickname}, MATCH([SITE ID]@row, {Master | SITE ID}, 0)))
Since only Parent rows will have Children, you can differentiate.
Kelly
Answers
-
Hey @Beth Fantozzi 1
There's a couple of ways to do what you need.
The IFERROR function is a way to mask an error message. It allows you to write whatever you would like in a cell to replace the error message, including a blank, or run alternate formulas. Notice your entire formula is wrapped within the IFERROR function followed by what you want the IFERROR to do if an error is encountered.
=IFERROR(INDEX({ Nickname}, MATCH([SITE ID]@row, {Master | SITE ID}, 0)),"")
The other handy formula is to differentiate Parent rows from Child rows. This is critical if the Parent row is using one formula while a Child row uses an alternate formula.
=IF(COUNT(CHILDREN())>0, INDEX({ Nickname}, MATCH([SITE ID]@row, {Master | SITE ID}, 0)))
Since only Parent rows will have Children, you can differentiate.
Kelly
-
@Kelly Moore Thank you for taking the time to look at this formula and for your explanation of these two options. This is now working!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 140 Industry Talk
- 472 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 496 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!