Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default opposite of Merging data in multiple columns into one

hi everyone here is code which Merge data in multiple columns into one

http://www.mcgimpsey.com/excel/index.html#xlvbamacros

i just want to do opposite of this

i have data in a column and i want to put it in different columns
(sequentially)

data in a column is separated by an empty cell
say i have data from a1 to a5 then empty cell again a7:a13
again empty cell like wise [n] number of data in "a"

so i want to put a1:a5 data in c1:c5
a7:a13 data in d1:d7 etc etc

i hope i wil get spport from this experts community

many thanx in advance
waiting 4 ur reply

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 324
Default opposite of Merging data in multiple columns into one

Give this a whirl.

Sub MoveData()
Dim rng As Range
x = 3
With Cells

Set rng = .Range(.Cells(1, 1), .Cells(1, 1).End(xlDown))
Do
rng.Select
Selection.Copy
Cells(1, x).PasteSpecial
x = x + 1

rng.Offset(2, 0).Select
Selection.Find("").Offset(1, 0).Activate
If ActiveCell = "" Then
Exit Sub
End If
Set rng = .Range(ActiveCell.Address, ActiveCell.End(xlDown))
Loop
End With
End Sub--
Best wishes,

Jim


" wrote:

hi everyone here is code which Merge data in multiple columns into one

http://www.mcgimpsey.com/excel/index.html#xlvbamacros

i just want to do opposite of this

i have data in a column and i want to put it in different columns
(sequentially)

data in a column is separated by an empty cell
say i have data from a1 to a5 then empty cell again a7:a13
again empty cell like wise [n] number of data in "a"

so i want to put a1:a5 data in c1:c5
a7:a13 data in d1:d7 etc etc

i hope i wil get spport from this experts community

many thanx in advance
waiting 4 ur reply


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default opposite of Merging data in multiple columns into one

Nitn28,

If the values in column A are just values (not formulas):

Sub Nitn28()
Dim i As Integer

With Range("A:A").SpecialCells(xlCellTypeConstants, 23)
For i = 1 To .Areas.Count
Cells(1, i + 2).Resize(.Areas(i).Cells.Count).Value = _
.Areas(i).Cells.Value
Next i
End With
End Sub

HTH,
Bernie
MS Excel MVP


wrote in message oups.com...
hi everyone here is code which Merge data in multiple columns into one

http://www.mcgimpsey.com/excel/index.html#xlvbamacros

i just want to do opposite of this

i have data in a column and i want to put it in different columns
(sequentially)

data in a column is separated by an empty cell
say i have data from a1 to a5 then empty cell again a7:a13
again empty cell like wise [n] number of data in "a"

so i want to put a1:a5 data in c1:c5
a7:a13 data in d1:d7 etc etc

i hope i wil get spport from this experts community

many thanx in advance
waiting 4 ur reply



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default opposite of Merging data in multiple columns into one

THANKS ALOT

Mr. Bernie Deitrick & Mr. Jim Jackson

for your time , effort

it worked fine , Many Thanks again

wishing u great time ahead

with regrds
nitn28

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
Merging multiple columns of data into one column of data Archangel Excel Discussion (Misc queries) 7 February 24th 07 10:02 AM
Merging two columns, data in one michaelberrier Excel Discussion (Misc queries) 7 January 25th 07 05:37 AM
merging some data in 2 columns Karla Excel Discussion (Misc queries) 1 August 8th 06 04:49 AM
Merging two columns of data JustMe602 Excel Discussion (Misc queries) 4 January 6th 06 07:17 PM
Merging duplicate data across multiple columns Richard Dex Excel Programming 2 April 27th 04 03:28 AM


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