Need help stopping an Index and Match search when it encounters a lower value

MNik

New Member
Joined
Aug 30, 2022
Messages
15
Office Version
  1. 365
Platform
  1. Windows
I am trying to search a bill of materials for the next part in a product tree to identify the first "end item" underneath a parent part if there is one available. Here is the index and match formula that I have so far. The issue that I am having is that in certain cases, it is jumping to different branches of the product tree based on based on the part level meeting the criteria of the search. Is there a way to have the search stop once it reaches the end of a current branch?

Excel Formula:
=IF(AND(AB40319=FALSE,INDEX(A40319:A85799,MATCH(TRUE,AB40319:AB85799,0)) > A40319),INDEX(B40319:B85799,MATCH(TRUE,AB40319:AB85799,0)),"-")

Example: AG40319 returns value from row A40378 when I would like it to stop searching at row 40342 and return nothing due to reaching the end of the branch without finding an end item.

Sorry for the screenshot instead of a sample sheet. I wasn't able to get the sample sheet add-in to work.
 

Attachments

  • Example.png
    Example.png
    146.6 KB · Views: 8

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.

Forum statistics

Threads
1,214,944
Messages
6,122,384
Members
449,080
Latest member
Armadillos

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top