Splitting Text String

mouse88

Board Regular
Joined
May 24, 2011
Messages
148
I am pulling data in from another spreadsheet which is call statistics for a call centre.

The call centre staff have an option to out their phone on "Not Ready" and when they do this they have to enter an activity code, 1, 2 or 3. When a report is produced for the phone data and I read it in to my sheet it comes formatted like this:

Code:
1. 00:00:00, 2. 00:00:00, 3. 00:00:00

I need to split this value in to three different colums so I only take the individual time values.

The problem is, If the employee doesnt use activity code 2 then the data may be as follows:

Code:
1. 00:00:00, 3. 00:00:00

Therefore I also need to do some sort of lookup before pulling the value out for 2 and if it doesn't exist default the column to 00:00:00.

Can anyone point me in the right direction?
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
Can you explain this code as I dont quite understand?

I need a way of checking if there is a value of 1. 2. or 3. there and grab the relevant time from the string. I the user hasen't used one of the options then stupidly instead of still including it with a value of 00:00:00 it just doesnt show it at all.

Thanks
 
Upvote 0
How many columns is your data in exactly?

How did the suggested formula not help?

That formula looks at the cell A1. If it is blank, it returns the string "00:00:00", otherwise returns the value of A1. You could instead return the value 0 and format as time, if the times are in their own cells.
 
Upvote 0
Hopefuly this image will help show you what I want:

mcelon.png


The raw data comes from a report generated by a call centre system. The data comes back as a single string and could like like any of the above scenarios. Basically I need to test the string for each option, if it is there then grab the relevant time value and if it's not there default the cell to "00:00:00".

Hope this helps
 
Upvote 0
Here is a formula solution:


Excel Workbook
ABCD
1Input String123
21. 02:50:02, 2. 05:04:36 3. 04:06:2502:50:0205:04:3604:06:25
31. 02:50:02 2. 04:06:2502:50:0204:06:2500:00:00
42. 05:04:36, 3. 04:06:2500:00:0005:04:3604:06:25
Sheet1
 
Upvote 0
I understand that you have a solution but if ..
a) you have Excel 2007+ (your screen shot looks like that could be the case), and
b) you want a single formula that will work for all three columns,
.. then you could try this one, copied across and down.

Excel Workbook
ABCD
21. 02:50:02, 2. 05:04:36 3. 04:06:252:50:025:04:364:06:25
31. 02:50:02 2. 04:06:252:50:024:06:250:00:00
42. 05:04:36, 3. 04:06:250:00:005:04:364:06:25
51. 02:50:02 3. 04:06:252:50:020:00:004:06:25
Split out Times
 
Upvote 0

Forum statistics

Threads
1,224,607
Messages
6,179,871
Members
452,949
Latest member
Dupuhini

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