# sorting data

#### fahimip

##### New Member
Morning Guys

I have a table i need to sort, it consists of three columns

Company, code & quantity

The problem i have is that company names can turn up more than once
this means that i need to be able to identify the rows where the company names are the same and then lump them together,
I could also do with addiing up the codes that are repeated.

heres an example;

Company Qty code

HARRISON 1 SCR/SUPP/54
J A LTD 1 SCR/SUPP/11
FOUNDRY LTD 1 SCR/SUPP/06
2 SCR/SUPP/54
1 SCR/SUPP/54
CASTINGS LTD 1 SCR/SUPP/54
SIGMACASH LTD 4 SCR/SUPP/54
THOMAS 1 SCR/SUPP/54
1 SCR/SUPP/06
CHINA ENG CO LTD 1 SCR/SUPP/44

FOUNDRY LTD 6 SCR/SUPP/06
2 SCR/SUPP/61
16 SCR/SUPP/06
1 SCR/SUPP/06
2 SCR/SUPP/61
1 SCR/SUPP/06
CASTINGS LTD 1 SCR/SUPP/07
1 SCR/SUPP/06

I realise its all over the place, but the company name comes first followed by a quantity and code (SCR/SUPP....)

if you have any questions please let me know

i will attempt to get back to you asap

Thanks

### Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.

#### Andrew Poulsom

##### MrExcel MVP
If your data looks like this:
Book2
ABCD
1HARRISON1SCR/SUPP/54
2J A LTD1SCR/SUPP/11
3FOUNDRY LTD1SCR/SUPP/06
42SCR/SUPP/54
51SCR/SUPP/54
6CASTINGS LTD1SCR/SUPP/54
7SIGMACASH LTD4SCR/SUPP/54
8THOMAS1SCR/SUPP/54
91SCR/SUPP/06
10CHINA ENG CO LTD1SCR/SUPP/44
11FOUNDRY LTD6SCR/SUPP/06
122SCR/SUPP/61
1316SCR/SUPP/06
141SCR/SUPP/06
152SCR/SUPP/61
161SCR/SUPP/06
17CASTINGS LTD1SCR/SUPP/07
181SCR/SUPP/06
Sheet1

Click the header for column A and choose Edit|Go To|Special|Blanks|OK. Type =, press the up arrow and press Ctrl+Enter to fill in the missing names. Click the header again and Copy|Paste Special Values to remove the formulas.

Now insert some suitable headers in row 1, and you can sort the list or create a pivot table from it.

#### fahimip

##### New Member
Cheers Andrew, neat trick

that worked a treat

Replies
3
Views
562
Replies
0
Views
122
Replies
2
Views
153
Replies
2
Views
1K
Replies
10
Views
362

1,141,718
Messages
5,708,070
Members
421,543
Latest member
SGM

### 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.

### Which adblocker are you using?

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

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