Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 37
Default delimited data in column

Column F has data in the following format:

Column F
1.01
0.94
1.44,0.22
3.03
1.87,0.05
3.99
2.74,0.15,1.68,0.09
0.76
3.39
20.14

Where there are 2 or more numbers in each cell I need to
insert a row(s). I then need to put all the numbers into
the column and then total the cell into column E. The
finished data would look like this:

E F
1.01 1.01
0.94 0.94
1.66 1.44
0.22
3.03 3.03
1.92 1.87
0.05
3.99 3.99
4.66 2.74
0.15
1.68
0.09
0.76 0.76
3.39 3.39
20.14 20.14

Thanks in advance.

Gareth

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 599
Default delimited data in column

Gareth

Try this

Sub DelimitedCols()

Dim DelList As Variant
Dim i As Long
Dim CellRw As Long
Dim sh As Worksheet
Dim Ttl As Double

Set sh = ThisWorkbook.Sheets(1)

For CellRw = 12 To 3 Step -1
DelList = Split(sh.Range("F" & CellRw).Value, ",")
Ttl = DelList(LBound(DelList))
If UBound(DelList) LBound(DelList) Then
For i = LBound(DelList) + 1 To UBound(DelList)
sh.Range("F" & CellRw).Offset(1, 0).EntireRow.Insert
sh.Range("F" & CellRw).Offset(1, -1).Value = DelList(i)
Ttl = Ttl + DelList(i)
Next i
sh.Range("F" & CellRw).Value = DelList(LBound(DelList))
sh.Range("F" & CellRw).Offset(0, -1).Value = Ttl
Else
sh.Range("F" & CellRw).Offset(0, -1).Value = _
sh.Range("F" & CellRw).Value
End If
Next CellRw

End Sub

--
Dick Kusleika
MVP - Excel
www.dicks-clicks.com
Post all replies to the newsgroup.

"gareth" wrote in message
...
Column F has data in the following format:

Column F
1.01
0.94
1.44,0.22
3.03
1.87,0.05
3.99
2.74,0.15,1.68,0.09
0.76
3.39
20.14

Where there are 2 or more numbers in each cell I need to
insert a row(s). I then need to put all the numbers into
the column and then total the cell into column E. The
finished data would look like this:

E F
1.01 1.01
0.94 0.94
1.66 1.44
0.22
3.03 3.03
1.92 1.87
0.05
3.99 3.99
4.66 2.74
0.15
1.68
0.09
0.76 0.76
3.39 3.39
20.14 20.14

Thanks in advance.

Gareth



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
Import data csv file - tab delimited - and sort to column Jackanorry Excel Discussion (Misc queries) 3 January 3rd 10 07:56 AM
entire column to comma delimited cell samuel Excel Discussion (Misc queries) 2 September 5th 08 05:33 PM
How can I convert tab delimited files to pipe delimited? Jeremy Town Excel Discussion (Misc queries) 2 November 15th 07 04:29 PM
Convert column data to semicolon delimited text string Richard RE Excel Worksheet Functions 1 September 5th 06 03:03 PM
Import Comma delimited info in a Column Burger23 Excel Worksheet Functions 10 March 6th 06 03:48 AM


All times are GMT +1. The time now is 11:26 AM.

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

About Us

"It's about Microsoft Excel"