Need help with formula

BluRid

New Member
Joined
Dec 28, 2023
Messages
10
Office Version
  1. 365
Platform
  1. Windows
Hey, i got a list of products and the components of every product and need a formula to lookup whatever component number i need and find all the products that uses that component. The list looks like this:
1719241655024.png


So what i need is: Lets take A40142011 at line 18 as an example: I want the formula to search for A40142011 in the list and find all products (all components of the product has the same "Stykkliste" number, so everything with the number 17378 is components of the product A40142002. So i want the output of the formula to be "Component is used when creating product: A40142002" and if multiple products is made by using that component it will list all of those aswell based on matching "Stykkliste" numbers. Basically it should look for matches, check stykkliste number and then return the product material nr that belongs to the stykkliste number or numbers.

Materialnummer: end product
Komponenter: components
Stykkliste: number that connects the end product to the components
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
Hi, I'm not sure if I quite understood your request, but this was my interpretation :

In Cell L3, I typed the Komponent number you were referencing. Then I put this formula below in cell Q4 for example :

Excel Formula:
=LET(styk,FILTER(B5:B36,L5:L36=L3,""),result,SCAN(0,styk,LAMBDA(a,v,XLOOKUP(v,B5:B36,D5:D36,""))),result)

That generates a list of the materialnummers that the Komponent is related to.

Let me know if thats what you meant ?

thanks
Rob
 
Upvote 0
My take on this
Excel Formula:
=LET(f,FILTER(B5:D100,J5:J100=J3),FILTER(f,INDEX(f,,2)<>""))
 
Upvote 1
oops sorry, I realised I had a couple spare columns inserted, so formula should be this: with komponent in J3

Excel Formula:
=LET(styk,FILTER(B5:B36,J5:J36=J3,""),result,SCAN(0,styk,LAMBDA(a,v,XLOOKUP(v,B5:B36,D5:D36,""))),result)

I knew @Fluff would embarass me with something more simple as soon as I posted something ;)

good job ..
Rob
 
Upvote 1
Solution

Forum statistics

Threads
1,218,220
Messages
6,141,229
Members
450,344
Latest member
renslaw

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