title: Sort groups of rows by partial text
body: <p>My database outputs data as HTML sorted in a way that is not useful to me. I would like to be able to re-sort it in Excel.  The problem is twofold:</p>
  
  <p>1) The data is output into 9 rows at a time, with 3 header rows.  Each of these 9 rows need to be kept together, in order, when sorting.</p>
  
  <p>2) The primary sort key is the SECOND HALF of one of the data cells.  In the attached image, H14 is the location I need to sort by, containing "3M (WSW)"-- but I don't want to sort by "3M", I want to sort by "(WSW)".  Now, not every data element HAS the portion in parenthesis, and not every data element has anything BEFORE the parenthesis, but the portion inside the parenthesis is all I want to sort by.  The secondary sort key would be the first half of the same cell, and the tertiary sort key would be the part number in A5, A14, etc.</p>
  
  <p><a href="https://i.imgur.com/kP2kLzk.png" rel="nofollow noreferrer"><img src="https://i.imgur.com/kP2kLzk.png" alt="Link to Image of Spreadsheet"></a></p>
  
  <p>I've searched google and this site for help, and I understand that I can add some additional columns to sort by (or make a VBA program to sort with, but I haven't coded in VBA for something like 15 years now and I don't feel up to it).  This database dump has hundred and hundreds of records, so I need some formulas to use to make these sorting columns-- there's no way I can do this by hand every week with hundreds of records.  I have no idea how to make formulas that will sort by my primary, secondary, and tertiary sort criteria AND keep the rows within the groups in their original order.</p>