• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Array formula needed. Example sheet

unclejemima

New Member
Hi guys. I've got a formula I'm looking for, I think an array formula is what I need. Hoping this can be done without VBA...

What I'm looking for is a formula for column O:Q that gives the results as shown. Basically, for any instance of Main PN (circled in black), it would show the sub PN (circled in green) and the qty for the parts in columns C:M. You can see the groups C:D, F:G, I:J, L:M with PN and Qty.

Its kinda hard to explain but if you look at the screenshot you should be able to figure it out lol.

Thank you!!

66198
 
unclejemima
As You're a new member, You've just read Forum Rules..
Could You refresh Your memory and reread especially
How to get the Best Results at Chandoo.org -chapter.
There are many good hints and
You'll notice soon - what is missing from Your the 1st post?
 
Thanks :) I meant to attach the sample file but forgot. My bad :)

See attached. I tried to edit the first post but can't seem to figure out how.

Thank you all!
 

Attachments

  • Test Book March 5, 2020.xlsx
    41.6 KB · Views: 7
Hi:

May be this using Power Query.

Thanks
 

Attachments

  • Test Book March 5, 2020.xlsx
    144.9 KB · Views: 4
I wouldn't describe an array solution as simple. I have used named formulas to hold parts of a nested formula and have access to dynamic arrays including the SEQUENCE and FILTER functions. Given that:

66212
generates a dynamic array that only differs from your results in terms of its sort order.

66213
(411 rows)
 
Thanks guys super appreciate it. Nebu, your power query looks good. Thank you!

Peter, any chance you can upload the sample sheet with your formula? I see the screenshot of your formula's but I'm not 100% sure how to apply them.

Thank you :)
 
This will only work is you have an appropriate version of Office 365.
Otherwise you need to create the sequence 'k' using row numbers. The filter would be done by returning an array of row numbers with missing values where Qty=0. The SMALL function would compress the list but it will not be good fun!
 

Attachments

  • Temp unpivot and filter (PB).xlsx
    53.3 KB · Views: 2
Yea my excel version was not so happy with that file lol. I'm using Excel 2013. Should have mentioned this.

So is it possible to build an array formula using SMALL function then? Or would the formula be as long as the bible?

If it is technically possible, I'd love to see an example sheet!

Thank you so kindly. This forum is awesome!
 
This may work. The first challenge is whether the Office 365 file with dynamic arrays converts correctly to Excel 2016.
Even if it does, another challenge might be whether you can live with the way I program Excel. It may not be unique but it is nowhere near a beaten track.
 

Attachments

  • Temp unpivot and filter (PB).xlsx
    85 KB · Views: 6
It is good to know that it worked for you.

The traditional Excel environment makes handling array formulas a somewhat heavy and inflexible process that masks their inherent simplicity. Modern dynamic arrays are far more fluid and pleasant to use (for your problem I have only one cell that contains a formula!) On my laptop the transformation of data took less than 0.2sec which should be acceptable but, if the responsiveness of the workbook becomes sluggish, the calculation of the sequence numbers 'k' can be changed to make it non-volatile.

66256
 
Back
Top