Need help with a formula

Jobb1Excel

New Member
Joined
Oct 17, 2023
Messages
22
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 the material number and find all the components of that material number. The list looks like this:

1701686078998.png


So what i need is: Lets take A40142002 at line 17 as an example: I want the formula to search for A40142002 in the list and find all components (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 "A40142002 components: A40142009 SNITTA GAFFELLEGG HØGRE FOR M 20 NO 401 + A40142011 GAFFELHODE FOR STREKKSKRUE M 20 NO 401" and if more components it will list all those aswell based on matching "Stykkliste" numbers.
 
Im trying to keep it as simple as possible, so all i basically need is a formula to check for matr nr vlookup the first match qty and date from that match and then in the cell under a formula to do the same for 2nd match and then i just drag it down and manually filter empty cells etc.

Example:
A2 <- matr nr.
If A2 has a match in sales sheet then return qty and date of the first match
cell under
If A2 has a second match then return qty and date of the second match
cell under
If A2 has a third match then return qty and date of the third match
 
Upvote 0

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
ok, well I can only offer my advice ... you don't need to use it of course.

You have the advantage of seeing all your sheets and knowing what is where, whereas I here just have a picture of a screen grab. So its a bit tricky to follow - please take a look at the XL2BB tool we have on here to post your data, as it means more chance of people finding time to help (eg, rather than like me trying to type manually some of your data from a picture). You'll get better results from the forum in this way.

So as far as I can tell (again, you have the advantage of Swedish .. whereas to me this data all looks like a foreign language without much meaning (sorry)), I think this will get what you are asking.
The formula of interest to you is in K4.

byrow_filter.xlsx
ABCDEFGHIJKLM
1OrderDate
2A1101008IKKE BRUK VARMVALSA RUNDSTÅLST 378 MM6020030.11.2023
3A1105006IKKE BRUK BLANKTRUKKET STÅLST 3.7-2 6MM30060008.12.2023
4A1102205IKKE BRUK BLANKVALSA FLATT ST.37-2 45*3MM190
5A1105008IKKE BRUK BLANKTRUKKET STÅLST 3.7-2 8MM400
6A1102202IKKE BRUK BLANKVALSA FLATT ST.37-2 50*4MM400
7A3099002PREGA EMNER FOR KRAGEPINN 10*38,5MM100
810 A40143200EMNE FOR GAFFEL 1 1/4" NO 401/80140
9C_GJENGETAPPGJENGETAPP FOR 1 1/4" SJ40
10
11
12
Sheet3
Cell Formulas
RangeFormula
F2:H9F2=UNIQUE(FILTER(Sheet2!L2:O10,{1,1,0,1}))
K2:L3K2=CHOOSECOLS(FILTER(Sheet4!A2:I10,Sheet4!F2:F10=F2),8,9)
Dynamic array formulas.


My Sheet4 is set up as such (to try and reflect your image partially), so you can see how the formula is operating.

byrow_filter.xlsx
ABCDEFGHIJ
1MATR.NRQtyDeliv Date
230.11.2023B0059111622995 20.2451 customer 1A110100820030.11.2023
304.12.2023B00591216.22995 .2.22451 customer 2A110500810008.12.2023
429.11.2023B005913162.2995 .2.22451ocustomer 3278909412230.11.2023
530.11.2023B00591416.22995 .2.22451 customer 42021181101.12.2023
629.11.2023B00591516.22995 202451 customer51035018401.12.2023
727.11.2023B00591616.22995 .2.22451 customer 61017001301.12.2023
804.12.2023B005917162.2995 .2.22451 customer 7A110100860008.12.2023
924.11.2023B00591816.22995 .2.22451 customer 82701669401.12.2023
1004.12.2023B00591916.22995 202451 customer 9A07301252004.12.2023
1104.12.2023B00592016.22995 .2.22451 customer 10A999999204.12.2023
1227.11.2023B005921162.2995 .2.22451 customer 112789040805.12.2023
1330.11.2023B00592216.22995 .2.22451 customer 12A110500820006.12.2023
Sheet4


Good luck.

cheers
ROb
 
Upvote 1
Solution

Forum statistics

Threads
1,215,178
Messages
6,123,484
Members
449,100
Latest member
sktz

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