Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello
I have the following problem that I would like to solve with a VBA-macro In column A there is a string of letters and/or numbers in every cell, e.g. A1-A6 a za b hg v z I would like to buikd a new column B in the following way: The content of A2 goes behind A1, the content of A3 goes behind A2 and so on In the exemple above the column B is abza zabb b2hg hgfv vaz Does anybody know a VBA-macro that does this job Kind regard Michael E |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On the offhand chance a simple formula can be used:
in B2 or B1, your choice, but a formula =A1&A2 then drag fill down the column. -- Regards, Tom Ogilvy "Michael E." wrote in message ... Hello, I have the following problem that I would like to solve with a VBA-macro: In column A there is a string of letters and/or numbers in every cell, e.g. A1-A6: ab zab b2 hgf va zb I would like to buikd a new column B in the following way: The content of A2 goes behind A1, the content of A3 goes behind A2 and so on. In the exemple above the column B is: abzab zabb2 b2hgf hgfva vazb Does anybody know a VBA-macro that does this job? Kind regards Michael E. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello Tom
since the transformation should be included in an existing VBA macro I need a VBA solution. Do you know how a macro solution Kind regard Michae ----- Tom Ogilvy wrote: ---- On the offhand chance a simple formula can be used in B2 or B1, your choice, but a formul =A1&A then drag fill down the column - Regards Tom Ogilv "Michael E." wrote in messag .. Hello I have the following problem that I would like to solve with a VBA-macro In column A there is a string of letters and/or numbers in every cell e.g. A1-A6 a za b hg v z I would like to buikd a new column B in the following way: The content o A2 goes behind A1, the content of A3 goes behind A2 and so on In the exemple above the column B is abza zabb b2hg hgfv vaz Does anybody know a VBA-macro that does this job Kind regard Michael E |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
For i = 1 To 5
Range("B" & i).Value = Range("A" & i).Value & Range("A" & i + 1).Value Next Alan Beban Michael E. wrote: Hello Tom, since the transformation should be included in an existing VBA macro I need a VBA solution. Do you know how a macro solution? Kind regards Michael ----- Tom Ogilvy wrote: ----- On the offhand chance a simple formula can be used: in B2 or B1, your choice, but a formula =A1&A2 then drag fill down the column. -- Regards, Tom Ogilvy "Michael E." wrote in message ... Hello, I have the following problem that I would like to solve with a VBA-macro: In column A there is a string of letters and/or numbers in every cell, e.g. A1-A6: ab zab b2 hgf va zb I would like to buikd a new column B in the following way: The content of A2 goes behind A1, the content of A3 goes behind A2 and so on. In the exemple above the column B is: abzab zabb2 b2hgf hgfva vazb Does anybody know a VBA-macro that does this job? Kind regards Michael E. |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub Concatenate2()
Range("B1:B5").Formula = "=A1&A2" Range("B1:B5").Formula = Range("B1:B5").Value End Sub -- Regards, Tom Ogilvy "Michael E." wrote in message ... Hello Tom, since the transformation should be included in an existing VBA macro I need a VBA solution. Do you know how a macro solution? Kind regards Michael ----- Tom Ogilvy wrote: ----- On the offhand chance a simple formula can be used: in B2 or B1, your choice, but a formula =A1&A2 then drag fill down the column. -- Regards, Tom Ogilvy "Michael E." wrote in message ... Hello, I have the following problem that I would like to solve with a VBA-macro: In column A there is a string of letters and/or numbers in every cell, e.g. A1-A6: ab zab b2 hgf va zb I would like to buikd a new column B in the following way: The content of A2 goes behind A1, the content of A3 goes behind A2 and so on. In the exemple above the column B is: abzab zabb2 b2hgf hgfva vazb Does anybody know a VBA-macro that does this job? Kind regards Michael E. |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
"Alan Beban" wrote...
For i = 1 To 5 Range("B" & i).Value = Range("A" & i).Value & _ Range("A" & i + 1).Value Next .... Range("B1:B5").Value = Evaluate("=A1:A5&A2:A6") would be an alternative. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Vlookup to transform columns to rows | Excel Worksheet Functions | |||
Transform csv to qif or ofx format? | Excel Discussion (Misc queries) | |||
How I transform a row into a column? | Excel Discussion (Misc queries) | |||
How I transform a row into a column? | Excel Discussion (Misc queries) | |||
Table Transform | Excel Discussion (Misc queries) |