LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Seperating data from one column into two columns

Hi C,

Try:

'=============
Public Sub Tester01()
Dim WB As Workbook
Dim SH As Worksheet
Dim rng As Range
Dim destRng As Range
Dim rCell As Range
Dim LastRow As Long
Dim iCol As Long
Const Col As Long = 1 '(column "A") '<<==== CHANGE

Set WB = Workbooks("YourBook.xls") '<<===== CHANGE
Set SH = WB.Sheets("Sheet3") '<<===== CHANGE

With SH
LastRow = .Cells(Rows.Count, Col).End(xlUp).Row
Set rng = Range(Cells(2, Col), Cells(LastRow, Col))

rng.Offset(0, 1).Resize(, 2).ClearContents

For Each rCell In rng.Cells
iCol = IIf(iCol = Col + 1, Col + 2, Col + 1)
Set destRng = .Cells(Rows.Count, iCol).End(xlUp)(2)
rCell.Copy destRng
Next rCell
End With

End Sub
'<<=============


---
Regards,
Norman



"cshivley" wrote in
message ...

The columns looks like this:

x1
y1
x2
y2
x3
y3



 
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
seperating columns sbinva Excel Discussion (Misc queries) 1 November 11th 08 10:17 PM
Seperating Text from Columns Johnny B[_2_] Excel Discussion (Misc queries) 1 March 28th 07 03:01 AM
Seperating Text from Columns Greg Wilson Excel Discussion (Misc queries) 0 March 28th 07 02:50 AM
Seperating Text from Columns Johnny B[_2_] Excel Discussion (Misc queries) 0 March 28th 07 01:16 AM
Seperating cells and columns DRLski Excel Discussion (Misc queries) 3 September 1st 05 06:02 PM


All times are GMT +1. The time now is 09:57 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"