ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   VBA for Text/Cells merge (https://www.excelbanter.com/excel-discussion-misc-queries/89523-vba-text-cells-merge.html)

Ron

VBA for Text/Cells merge
 
With Excel 2002 I need some help please to VBA code the following

A B C D
1 bbb
2 ccc
3 kkk
4 yyy

Merge text cells B1 & B2;
B3 & B4..... etc.......

The merged results should be displayed in A1; A2; etc

Col B varies on a daily basis but is rarely less that 1500 cells.

There are no blank cells in the B col range.

TIA

R.

CLR

VBA for Text/Cells merge
 
You could do it with formulas, just put this in A1 and copy down, then Copy
PasteSpecial Values, and delete the blanks...

=IF(ISODD(ROW(B1)),B1&OFFSET(B1,1,0),"")

Vaya con Dios,
Chuck, CABGx3



"Ron" wrote:

With Excel 2002 I need some help please to VBA code the following

A B C D
1 bbb
2 ccc
3 kkk
4 yyy

Merge text cells B1 & B2;
B3 & B4..... etc.......

The merged results should be displayed in A1; A2; etc

Col B varies on a daily basis but is rarely less that 1500 cells.

There are no blank cells in the B col range.

TIA

R.


Ron

VBA for Text/Cells merge
 
Chuck,

Entered the formula in A1 and copied down but get #NAME? in each A
cell.

More help/clarifcation needed please.

R.



On Fri, 19 May 2006 06:08:02 -0700, CLR
wrote:

You could do it with formulas, just put this in A1 and copy down, then Copy
PasteSpecial Values, and delete the blanks...

=IF(ISODD(ROW(B1)),B1&OFFSET(B1,1,0),"")

Vaya con Dios,
Chuck, CABGx3



"Ron" wrote:

With Excel 2002 I need some help please to VBA code the following

A B C D
1 bbb
2 ccc
3 kkk
4 yyy

Merge text cells B1 & B2;
B3 & B4..... etc.......

The merged results should be displayed in A1; A2; etc

Col B varies on a daily basis but is rarely less that 1500 cells.

There are no blank cells in the B col range.

TIA

R.


CLR

VBA for Text/Cells merge
 
Sorry, forgot to mention you should make sure you have the Analysis ToolPak
installed..........

Tools Add-Ins check the Analysis toolPak OK

Vaya con Dios,
Chuck, CABGx3


"Ron" wrote:

Chuck,

Entered the formula in A1 and copied down but get #NAME? in each A
cell.

More help/clarifcation needed please.

R.



On Fri, 19 May 2006 06:08:02 -0700, CLR
wrote:

You could do it with formulas, just put this in A1 and copy down, then Copy
PasteSpecial Values, and delete the blanks...

=IF(ISODD(ROW(B1)),B1&OFFSET(B1,1,0),"")

Vaya con Dios,
Chuck, CABGx3



"Ron" wrote:

With Excel 2002 I need some help please to VBA code the following

A B C D
1 bbb
2 ccc
3 kkk
4 yyy

Merge text cells B1 & B2;
B3 & B4..... etc.......

The merged results should be displayed in A1; A2; etc

Col B varies on a daily basis but is rarely less that 1500 cells.

There are no blank cells in the B col range.

TIA

R.



Ron

VBA for Text/Cells merge
 
Chuck,

That did it.... great & thank you.

In the formula

=IF(ISODD(ROW(B1)),B1&OFFSET(B1,1,0),"")

where would I add a "CHAR(10)" to operate between rows 1 & 2, 3 & 4
etc

R.


On Sat, 20 May 2006 17:22:01 -0700, CLR
wrote:

Sorry, forgot to mention you should make sure you have the Analysis ToolPak
installed..........

Tools Add-Ins check the Analysis toolPak OK

Vaya con Dios,
Chuck, CABGx3


"Ron" wrote:

Chuck,

Entered the formula in A1 and copied down but get #NAME? in each A
cell.

More help/clarifcation needed please.

R.



On Fri, 19 May 2006 06:08:02 -0700, CLR
wrote:

You could do it with formulas, just put this in A1 and copy down, then Copy
PasteSpecial Values, and delete the blanks...

=IF(ISODD(ROW(B1)),B1&OFFSET(B1,1,0),"")

Vaya con Dios,
Chuck, CABGx3



"Ron" wrote:

With Excel 2002 I need some help please to VBA code the following

A B C D
1 bbb
2 ccc
3 kkk
4 yyy

Merge text cells B1 & B2;
B3 & B4..... etc.......

The merged results should be displayed in A1; A2; etc

Col B varies on a daily basis but is rarely less that 1500 cells.

There are no blank cells in the B col range.

TIA

R.



Ron

VBA for Text/Cells merge
 
On Sun, 21 May 2006 17:44:45 +0200, Ron wrote:

Chuck,

Please disregard my earlier post re the CHAR(10) insert

I figured it out.

=IF(ISODD(ROW(B1)),B1&CHAR(10)&OFFSET(B1,1,0),"")

Again thank you very much for your help

R.
Chuck,

That did it.... great & thank you.

In the formula

=IF(ISODD(ROW(B1)),B1&OFFSET(B1,1,0),"")

where would I add a "CHAR(10)" to operate between rows 1 & 2, 3 & 4
etc

R.


On Sat, 20 May 2006 17:22:01 -0700, CLR
wrote:

Sorry, forgot to mention you should make sure you have the Analysis ToolPak
installed..........

Tools Add-Ins check the Analysis toolPak OK

Vaya con Dios,
Chuck, CABGx3


"Ron" wrote:

Chuck,

Entered the formula in A1 and copied down but get #NAME? in each A
cell.

More help/clarifcation needed please.

R.



On Fri, 19 May 2006 06:08:02 -0700, CLR
wrote:

You could do it with formulas, just put this in A1 and copy down, then Copy
PasteSpecial Values, and delete the blanks...

=IF(ISODD(ROW(B1)),B1&OFFSET(B1,1,0),"")

Vaya con Dios,
Chuck, CABGx3



"Ron" wrote:

With Excel 2002 I need some help please to VBA code the following

A B C D
1 bbb
2 ccc
3 kkk
4 yyy

Merge text cells B1 & B2;
B3 & B4..... etc.......

The merged results should be displayed in A1; A2; etc

Col B varies on a daily basis but is rarely less that 1500 cells.

There are no blank cells in the B col range.

TIA

R.



CLR

VBA for Text/Cells merge
 
You're welcome Ron, and it's good to see you figured out how to edit it
yourself.

Vaya con Dios,
Chuck, CABGx3


"Ron" wrote in message
...
On Sun, 21 May 2006 17:44:45 +0200, Ron wrote:

Chuck,

Please disregard my earlier post re the CHAR(10) insert

I figured it out.

=IF(ISODD(ROW(B1)),B1&CHAR(10)&OFFSET(B1,1,0),"")

Again thank you very much for your help

R.
Chuck,

That did it.... great & thank you.

In the formula

=IF(ISODD(ROW(B1)),B1&OFFSET(B1,1,0),"")

where would I add a "CHAR(10)" to operate between rows 1 & 2, 3 & 4
etc

R.


On Sat, 20 May 2006 17:22:01 -0700, CLR
wrote:

Sorry, forgot to mention you should make sure you have the Analysis

ToolPak
installed..........

Tools Add-Ins check the Analysis toolPak OK

Vaya con Dios,
Chuck, CABGx3


"Ron" wrote:

Chuck,

Entered the formula in A1 and copied down but get #NAME? in each A
cell.

More help/clarifcation needed please.

R.



On Fri, 19 May 2006 06:08:02 -0700, CLR
wrote:

You could do it with formulas, just put this in A1 and copy down,

then Copy
PasteSpecial Values, and delete the blanks...

=IF(ISODD(ROW(B1)),B1&OFFSET(B1,1,0),"")

Vaya con Dios,
Chuck, CABGx3



"Ron" wrote:

With Excel 2002 I need some help please to VBA code the following

A B C D
1 bbb
2 ccc
3 kkk
4 yyy

Merge text cells B1 & B2;
B3 & B4..... etc.......

The merged results should be displayed in A1; A2; etc

Col B varies on a daily basis but is rarely less that 1500 cells.

There are no blank cells in the B col range.

TIA

R.






All times are GMT +1. The time now is 05:38 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com