Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Daniel M
 
Posts: n/a
Default merging and transposing cells

Below is an example of the data i need modified. I do this to data several
times a month and then save it as comma delmimted for another system. If
there is anything you can do to help me in all or part, please let me know.
here is my data...

2 columns
a b
212 2132
213 21321
465 1669
7948 8989
.... ...

This goes on for 40+ lines.

i then need the data to be in one cell merged together like so...

2122132
21321321
4651669
79488989
....

once done i need the data to be transposed like so...

a b c d...
2122132 21321321 4651669 79488989...




  #2   Report Post  
R.VENKATARAMAN
 
Posts: n/a
Default

try this url and see whether you get what you want

Public Sub test()
Dim cell As Range
Dim cellone As Range
Dim myrange As Range
Set cellone = Range("a1")
Set myrange = Range(cellone, cellone.End(xlDown))
For Each cell In myrange
cell.Activate
ActiveCell.Offset(0, 2) = ActiveCell & ActiveCell.Offset(0, 1)
Next
Range(cellone.Offset(0, 2), cellone.Offset(0, 2).End(xlDown)).Select
Selection.Copy
cellone.Offset(0, 3).Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:=
False, Transpose:=True
Application.CutCopyMode = False
Columns("a:c").Delete
End Sub

Daniel M wrote in message
k.net...
Below is an example of the data i need modified. I do this to data several
times a month and then save it as comma delmimted for another system. If
there is anything you can do to help me in all or part, please let me

know.
here is my data...

2 columns
a b
212 2132
213 21321
465 1669
7948 8989
... ...

This goes on for 40+ lines.

i then need the data to be in one cell merged together like so...

2122132
21321321
4651669
79488989
...

once done i need the data to be transposed like so...

a b c d...
2122132 21321321 4651669 79488989...






  #3   Report Post  
Ola
 
Posts: n/a
Default

One option is:

1. To join the two cells in colmn C:
=A1&A2
copy down

2. To transpose: Write this function in D1:
=OFFSET($C$1,COLUMN()-4,0)
Copy this to E1...AN1?


Ola Sandstrom

  #4   Report Post  
Lomax
 
Posts: n/a
Default

Daniel M,

why not make a "helper column" "c" and concatenate column A and B in your
new column"C". "Copy" & "paste special values". When this is populated
select the "40+ lines" Copy and "Paste Special Transpose" to the 1st column
that you want to hold the new data.

HTH
Lomax

Have a great day..


"Daniel M" wrote in message
k.net...
Below is an example of the data i need modified. I do this to data several
times a month and then save it as comma delmimted for another system. If
there is anything you can do to help me in all or part, please let me
know. here is my data...

2 columns
a b
212 2132
213 21321
465 1669
7948 8989
... ...

This goes on for 40+ lines.

i then need the data to be in one cell merged together like so...

2122132
21321321
4651669
79488989
...

once done i need the data to be transposed like so...

a b c d...
2122132 21321321 4651669 79488989...






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



All times are GMT +1. The time now is 10:32 PM.

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"