Finding the highest revision levels in a BoM

DazCD

New Member
Joined
Aug 19, 2024
Messages
26
Office Version
  1. 365
Platform
  1. Windows
Good morning everyone:

I'm trying to filter on a HUGE sheet to find the highest revision for a parent code using the following formula:

=FILTER(INDEX('[EFACS Data Downloads (BOM)..xlsx]BOM Parts'!$A:$K, SEQUENCE(ROWS('[EFACS Data Downloads (BOM)..xlsx]BOM Parts'!$A:$A)), {1,2,4,5,11}), '[EFACS Data Downloads (BOM)..xlsx]BOM Parts'!$A:$A=R2) (The top level code is being typed into R2)

Which returns the following:

Product CodeParent DescriptionBoM ChildChild DescriptionMethod
CD650017180g Teeny Tiny Turtles 2025N6001863kg Bubble Gum Teeny Tiny Turtles1
CD650017180g Teeny Tiny Turtles 2025N98427Compostable SS Bag 76x114x180 CRIMP N0061
CD650017180g Teeny Tiny Turtles 2025Y000323Plain Label 60 x 65 Rectangle (1227)1
CD650017180g Teeny Tiny Turtles 2025FLCD100001%+Treat co Logo Label 2025+%1
CD650017180g Teeny Tiny Turtles 2025PB000445100mm x 90mtrs Direct Thermal Lab Media Perm Adhesive1
CD650017180g Teeny Tiny Turtles 2025BX001647APL214402 SRP Outer Box Sweets1
CD650017180g Teeny Tiny Turtles 2025BX001647APL214402 SRP Outer Box Sweets2
CD650017180g Teeny Tiny Turtles 2025FLCD100001%+Treat co Logo Label 2025+%2
CD650017180g Teeny Tiny Turtles 2025N6001863kg Bubble Gum Teeny Tiny Turtles2
CD650017180g Teeny Tiny Turtles 2025N98427Compostable SS Bag 76x114x180 CRIMP N0062
CD650017180g Teeny Tiny Turtles 2025Y000323Plain Label 60 x 65 Rectangle (1227)2
CD650017180g Teeny Tiny Turtles 2025PB00001976mm x 76mm White Thermal Box Label2
CD650017180g Teeny Tiny Turtles 2025BX001647APL214402 SRP Outer Box Sweets3
CD650017180g Teeny Tiny Turtles 2025FLCD100001%+Treat co Logo Label 2025+%3
CD650017180g Teeny Tiny Turtles 2025N98427Compostable SS Bag 76x114x180 CRIMP N0063
CD650017180g Teeny Tiny Turtles 2025PB00001976mm x 76mm White Thermal Box Label3
CD650017180g Teeny Tiny Turtles 2025Y000323Plain Label 60 x 65 Rectangle (1227)3
CD650017180g Teeny Tiny Turtles 2025Y000338Teeny Tiny Turtles (3kg)3
CD650017180g Teeny Tiny Turtles 2025BX001647APL214402 SRP Outer Box Sweets4
CD650017180g Teeny Tiny Turtles 2025FLCD100001%+Treat co Logo Label 2025+%4
CD650017180g Teeny Tiny Turtles 2025PB00001976mm x 76mm White Thermal Box Label4
CD650017180g Teeny Tiny Turtles 2025Y000323Plain Label 60 x 65 Rectangle (1227)4
CD650017180g Teeny Tiny Turtles 2025Y000338Teeny Tiny Turtles (3kg)4
CD650017180g Teeny Tiny Turtles 2025X00002475x114x160 Gussetted Cello Bag New4




However, As you can see, it's returning multiple BoM revisions (the 'Method'), I only want the highest number revision to appear, in this case all rows associated with '4', i've been messing with it for hours but can't figure it out.

Could any one kindly assist?
 
Ok, you need to change the 5 to a 6 in the 2 INDEX functions at the end of the formula

I did try this, but it returns a #CALC Error. I really appreciate your assistance with this btw!
 
Upvote 0

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
What is the current formula?

Okay some context:

Here are the Columns/Headers of the huge sheet i'm filtering data from (Columns A to K respectively):
bomparentParent DescriptionbomposbomchildChild DescriptionbomqtyuomChild TypeFromDateToDatebaltmethod

This is the current formula, Since the "Baltmethod" (revision No), is in Column K/11, I changed the Index to 11. I tried 6 but didn't seem to want to work for me.
=LET(f,FILTER(INDEX('F:\NPD\[EFACS Data Downloads (BOM)..xlsx]BOM Parts'!$A:$L, SEQUENCE(ROWS('F:\NPD\[EFACS Data Downloads (BOM)..xlsx]BOM Parts'!$A:$A)), {1,2,4,5,6,11}), 'F:\NPD\[EFACS Data Downloads (BOM)..xlsx]BOM Parts'!$A:$A='1st page front (2)'!B4),FILTER(f,INDEX(f,,11)=MAX(INDEX(f,,11))))
 
Upvote 0
I think your source data is TEXT.

Interesting, it's an SQL set up pulling the data from our ERP system. I just ran an "ISNUMBER" formula on the the coumn, it does indeed return False.
 
Upvote 0
The last two Index functions need to be 6, not 11
 
Upvote 0
The last two Index functions need to be 6, not 11

Apologies, I did try both of them as 6, and didn't appear to work.

As cubist mentioned, my original data may appear to be text values.
 
Upvote 0
In that case you will to change the SQL to return numbers, rather than text.
 
Upvote 0
In that case you will to change the SQL to return numbers, rather than text.

=LET(
f, FILTER(
INDEX('F:\NPD\[EFACS Data Downloads (BOM)..xlsx]BOM Parts'!$A:$K, SEQUENCE(ROWS('F:\NPD\[EFACS Data Downloads (BOM)..xlsx]BOM Parts'!$A:$A)), {1,2,4,5,6,11}),
'F:\NPD\[EFACS Data Downloads (BOM)..xlsx]BOM Parts'!$A:$A='1st page front (2)'!B4),
f_converted, IF(ISNUMBER(INDEX(f,,11)), INDEX(f,,6), VALUE(INDEX(f,,6))),
FILTER(f, f_converted = MAX(f_converted))
)

I actually tried running it through co pilot - it returned the above and appears to work. I'm unsure if it can be simplified though.
 
Upvote 0
You would be better off changing the query, so that it returns numbers.
 
Upvote 0

Forum statistics

Threads
1,225,734
Messages
6,186,709
Members
453,369
Latest member
positivemind

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