Sorting a list of groups by cell that contains a value

davepalese

New Member
Joined
Jun 8, 2004
Messages
8
Hey There,

I have a list of transactions that is structured as such:

Transaction # | Item ID | Item Sold Price

I have grouped them by the Trans#, and subtotaled the groups by the Item Sold Price.

What I can't figure out is how to resort the groups by putting groups at the top of the sheet that contain a certain value in the Item ID column.

My goal is this: I like to see what the total was for individual transactions containing a certain item.

To clarify, the value I will be sorting by in the Item ID column is a coupon code. We want to see for the X dollars we gave away with this certain coupon, how much did we make above what we gave away (ROI).

Thanks in advance for you help.

Dave
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
If you only want the total value (sum of Item Sold Price) for all transactions with a specified Item ID, then you don't need to sort the list to be able to get this.

SUMIF should get you the result you want.

Syntax is:

=SUMIF([criteria range],[criteria],[sum range])

which for you translates to:

=SUMIF([range of Item IDs],[Cell holding specified ID],[range of Item Sold Prices])

Does this do what you want, or have I missed something?
 
Upvote 0
Hey BigC,

What I want to do is this:

Let's say I end up with 6 groups.
And groups 1, 3, and 6 contain the word "Widget" in column B of one of their respective rows.
I want to be able to get groups 1, 3, and 6 moved to the top off the sheet, basically so I can then delete to other groups that don't contain "Widget".

Does that help?

Thanks again.
 
Upvote 0
If groups 1,3 & 6 contain nothing but Items = 'widget', and only these groups contain 'widget', then you have two options:

  1. Re-sorting:
    1. Ignore the 1-6 grouping and just sort the table by column B in descending order
    2. Delete the rows above (if any) and below that subgroup
  2. Apply Autofilters to the table then:
    1. Filter on column B for "Does NOT contain" 'widget' (will 'hide' the rows containing 'widget')
    2. Select all the cells remaining on display
    3. Press F5 (Goto)
    4. Click the 'Special' button at the bottom of the Goto dialogue box
    5. Select the "Visible Cells Only" radio button
    6. Execute the Delete Rows command (how depends on what version of Excel you're using)
    7. Clear the filters


Does this give you what you want?
 
Upvote 0

Forum statistics

Threads
1,214,985
Messages
6,122,607
Members
449,090
Latest member
vivek chauhan

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