highlighting cells with a similar name and grouping them

slice_of_pineapple

New Member
Joined
Feb 9, 2015
Messages
5
Hi.

I have a range of cells and im looking to highlight cells with a similar name and group them afterwards. See the example below.

P1234-s50600330540
P1234-m12235689
P1234-l113243575656747
P1234-xl345345674565675634
P1234-xxl4556232

<tbody>
</tbody>


I have hundreds of cells like this with the number on the left and a size beside it. Is there a way to highlight the cells with the same letter or numbers and then grouping them from that? I have over 670 different numbers all broken down into 5 (or more or less) sizes per number. If i was to group them all manually id be here for days!!

Normally i would subtotal the first column but excel cant deal with there being a different size at the end of each code.

Is there an easy way to do this?
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
There are probably a few ways of accomplishing this, but the easiest one I could think of would be to add two columns: one that gets the sizes and one that gets the item number.

Code:
'to return the item number
=LEFT(A1,FIND("-",A1)-1)

'to return the size
=MID(A1,FIND("-",A1)+1,LEN(A1)-FIND("-",A1)+1)
 
Upvote 0

Forum statistics

Threads
1,215,455
Messages
6,124,937
Members
449,196
Latest member
Maxkapoor

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