Excel 2003 - Sorting one column into multiple

g35qs

New Member
Joined
Jul 5, 2013
Messages
1
This has been sending me crazy all day.

Essentially I have two columns - one named category and one named time.

There are three categories. These are certain words however for this purpose I'll call these A, B, C (although this final category is always expressed as "C:[sub category]" which tends to make things slightly more difficult).

I need a formula which will search each row of the category column for a specific word such as "A" or "C". If the cell contains this word I need it to copy the corresponding time into a different cell in a separate table.

The purpose being that I need to sort my data from this format:

Category A - Time
Category B - Time
Category A - Time
Category C - Time

to this format:

Category A Category B Category C
Time Time
Time Time
Time Time
Time Time

A simple If statement such as =IF(A1="A",B2,"") doesn't work as it only searches one cell; if A1 didn't contain the word A then the cell would be left empty. I need this statement to repeat until the word A is found and then paste the corresponding time in the next row of the new table and then keep doing this until there are no more instances of A left.

Normally I'd assume that I could use a loop function, however as this is for use on a work computer which doesn't allow visual basic or macros, I think this may not be possible.

Anyone have any ideas? At 5pm on a Friday I can honestly no longer think logically I'm afraid.
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Hi and welcome to MrExcel.

Could you provide some sample data and your expected results?
You can post sample data by using one of the links in my signature.

Example of sample data and expected results.....

Excel Workbook
ABCDEFG
1CategoryTimeCategory ACategory BCategory C
2C:Bill01:0003:0002:0001:00
3B:Bob02:0004:0005:0007:00
4A:Bud03:0006:0008:00
5A:Don04:0010:0009:00
6B:Ben05:0011:00
7B:Dan06:00
8C:Tim07:00
9C:Tom08:00
10TestC:Test09:00
11Test1B:Test110:00
12Test2C:Test211:00
13Test:A12:00
14Test:B13:00
15Test:C14:00
16
17
Sheet14


The formula in D2 needs to be entered using ctrl shift enter and NOT just enter, it can then be copied across and down.

I hope this helps.

Ak
 
Upvote 0

Forum statistics

Threads
1,223,912
Messages
6,175,340
Members
452,638
Latest member
Oluwabukunmi

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