Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 51
Default break data into columns

Hi everybody,
I have downloaded some data from a file into excel, the data is
actually time data like the following:
2 days, 3 hours, 19 minutes, 15 seconds
17 hours, 4 minutes, 12 seconds
1 day, 1 minute, 38 seconds

it is all in column A, now i want to clean this data assigning it to
different columns, like in column B have hours, if no hours are found,
0 hours, C for minutes and so on so forth. i thought about Data Text
to columns but it doesnt help me much because components will not be
aligned, should i do something to my data so i can be able to get the
preferred result?
and something more please, how could this be done if i wanted to use a
formula?
because i also tried text formulas and i failed, it would be
interesting to me to learn both way if it could be done by both, if
not, just something to proceed on my job and thanks in advance
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 119
Default break data into columns

Depending on how the source data is formatted, it could be very simple. If
the data is in CSV format, (comma seperated values). then just go to the
menu:
Data-Import external data..- Import data.

Select 'Delimited'. Follow the prompts.

The csv data in the case of 'missing data' would look something like this

2 days, 3 hours, 19 minutes, 15 seconds
,17 hours, 4 minutes, 12 seconds
1 day, , 1 minute, 38 seconds

Notice the commas for the missing data. Excel will handle this type data
easily.
If the data is fixed width, Excel will handle that too. I can't demonstrate
that here.

John



"Totti" wrote:

Hi everybody,
I have downloaded some data from a file into excel, the data is
actually time data like the following:
2 days, 3 hours, 19 minutes, 15 seconds
17 hours, 4 minutes, 12 seconds
1 day, 1 minute, 38 seconds

it is all in column A, now i want to clean this data assigning it to
different columns, like in column B have hours, if no hours are found,
0 hours, C for minutes and so on so forth. i thought about Data Text
to columns but it doesnt help me much because components will not be
aligned, should i do something to my data so i can be able to get the
preferred result?
and something more please, how could this be done if i wanted to use a
formula?
because i also tried text formulas and i failed, it would be
interesting to me to learn both way if it could be done by both, if
not, just something to proceed on my job and thanks in advance

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 51
Default break data into columns

Hi John,
the data is formatted with a ", " comma and space after each unit but
they are not aligned, i tried what you told me, it still gives me the
days and the hours on the same column. is there at least a formula i
can split the data in different columns?
Thanks
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default break data into columns

A very similar question was asked less than two weeks ago, and you could use
a variation on the answer given then.

My approach would be to split the column into multiple columns using Data/
Text to Columns with comma and space as separators. This would leave your
numbers in the odd numbered columns, followed by the units in the even
numbered columns.
You could then use something like
=A1*(LEFT(B1,3)="day")+C1*(LEFT(D1,3)="day")+E1*(L EFT(F1,3)="day")+G1*(LEFT(H1,3)="day")
for your days
=A1*(LEFT(B1,4)="hour")+C1*(LEFT(D1,4)="hour")+E1* (LEFT(F1,4)="hour")+G1*(LEFT(H1,4)="hour")
for your hours, and so on.
--
David Biddulph

"Totti" wrote in message
...
Hi everybody,
I have downloaded some data from a file into excel, the data is
actually time data like the following:
2 days, 3 hours, 19 minutes, 15 seconds
17 hours, 4 minutes, 12 seconds
1 day, 1 minute, 38 seconds

it is all in column A, now i want to clean this data assigning it to
different columns, like in column B have hours, if no hours are found,
0 hours, C for minutes and so on so forth. i thought about Data Text
to columns but it doesnt help me much because components will not be
aligned, should i do something to my data so i can be able to get the
preferred result?
and something more please, how could this be done if i wanted to use a
formula?
because i also tried text formulas and i failed, it would be
interesting to me to learn both way if it could be done by both, if
not, just something to proceed on my job and thanks in advance



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 51
Default break data into columns

1000 thanks David, it works great


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
text to columns - break by delimiter mrl Excel Discussion (Misc queries) 4 April 17th 08 10:16 PM
how do i break information into columns after importing adamsj3 Excel Worksheet Functions 1 January 4th 08 06:20 PM
I want to take a date 2006/02/10 & break it into separate columns Curtis Excel Worksheet Functions 3 September 20th 06 06:13 PM
using CSV to break up text into multiple columns Deena at DCH FD Excel Discussion (Misc queries) 5 June 29th 06 02:59 AM
Sort columns between break lines winstonsnyder Excel Discussion (Misc queries) 1 August 21st 05 06:58 PM


All times are GMT +1. The time now is 02:12 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"