Excel 2010 Formula to dynamically sort rows

Posted on 2016-09-19
Last Modified: 2016-09-20

I have an Excel worksheet with a master list of 728 supply items (e.g. pens, paper, etc.), each with their corresponding Item Type, Vendor, Subitem type, Item Number, Minimum Quantity, etc.  The master list is grouped by Item Type and sub-grouped by Vendor to simplify reordering.  I'm looking for an index/match array formula to use in a second worksheet so I can display the same data grouped by Subitem type (ideally not in alphabetical order, but in an order specified by a column of SubItem types on a different worksheet).  I don't want to use VBA and I want the second worksheet to automatically update when I add an item to the master list.  I know that sounds like a tall order, but I thought I'd ask anyway:).  I've uploaded the master list.


Question by:drmerwin
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
  • 2
  • +1

Expert Comment

by:D Patel
ID: 41805997
Which are the criteria?

Provide it

Expert Comment

by:D Patel
ID: 41806004
You should submit the sample Output to get work on this

Assisted Solution

by:D Patel
D Patel earned 125 total points
ID: 41806049
Find the use of index, match and array formula incorporated in the sheet attached herewith.
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now


Expert Comment

by:D Patel
ID: 41806054
After opening the file press Ctrl+Shift+Enter in Cell 'C' to implement an array formula.

Assisted Solution

Koen earned 125 total points
ID: 41806244
the easiest way to do this without code and without creating a new list is as follows:

- turn your inventory into a table (that way when you add lines the range expands automatically and any formula is copied down automatically)
- add a column where you do a vlookup of the Sortindex (i.e. a logical number you add to the list on the seperate sheet with the subtypes -since you want the custom sort)
- then use the filter to sort on this index
LVL 22

Expert Comment

by:Ejgil Hedegaard
ID: 41807596
Check attached.

The sub item sort list is on the sheet SortIndex, where the list is in reverse order.
Just to show that the order does not matter.
It can be any order, as long as all subitems are there, if not an error will occur.
The sort order list counts the number of subitems, and finds the start row for that subitem to use on the sheet SubItemSort.

Column Q (Index) on sheet Inventory sets the position (row) to use on SubItemSort.
Column Q (Index) on sheet SubItemSort finds the row to use on Inventory.
It is not specifically needed, but makes the Index functions on SubItemSort much faster, when the row number is only searched once.

The Index functions on SubItemSort are made to row 1000, just copy down if more is needed.

Inventory and SortIndex are tables, because then formulas automatically adjust.
LVL 22

Accepted Solution

Ejgil Hedegaard earned 250 total points
ID: 41807601
Revised version where empty cells are not shown as 0.

Author Comment

ID: 41807945
That is great!  I still have some small details to work out but your solution is terrific and has opened my eyes to the benefit of tables in Excel.

All I have to do is manually change the order of SortIndex Column A and the SubItemSort worksheet will update, right?  Is there anything else I need to know?  Thank you so much for helping with this!!!


Author Closing Comment

ID: 41807947
Can't thank y'all enough for your help.  Have a great day.

Featured Post

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
My attempt to use PowerShell and other great resources found online to simplify the deployment of Office 365 ProPlus client components to any workstation that needs it, regardless of existing Office components that may be needing attention.
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question