ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to connect two columns in Excel VBA (https://www.excelbanter.com/excel-programming/345426-how-connect-two-columns-excel-vba.html)

[email protected]

How to connect two columns in Excel VBA
 
Hello ,
Could you tell me how to in easy way connect two columns.

I have
_____A_____B______C_____
1 | string | text | stringtext |
2 | string | text | stringtext |
3 | string | text | stringtext |
4 | string | text | stringtext |
...........................
40| string | text | stringtext |
41| etc.. | etc.. | stringtext |

Can I do it in a way that i have
Dim Rng1 As Range
Dim Rng2 As Range

Set Rng1 = Range("A:A").SpecialCells(xlCellTypeConstants)
Set Rng3 = Range("B:B").SpecialCells(xlCellTypeConstants)

Is there an easy function to connect these defined Ranges, Rng1 and
Rng2??
Thanks for response


R.VENKATARAMAN

How to connect two columns in Excel VBA
 
the code statemen will be somethinglike this

Range("c1") = Range("a1") & Range("B1")

space before and after & sign

=============
wrote in message
oups.com...
Hello ,
Could you tell me how to in easy way connect two columns.

I have
_____A_____B______C_____
1 | string | text | stringtext |
2 | string | text | stringtext |
3 | string | text | stringtext |
4 | string | text | stringtext |
..........................
40| string | text | stringtext |
41| etc.. | etc.. | stringtext |

Can I do it in a way that i have
Dim Rng1 As Range
Dim Rng2 As Range

Set Rng1 = Range("A:A").SpecialCells(xlCellTypeConstants)
Set Rng3 = Range("B:B").SpecialCells(xlCellTypeConstants)

Is there an easy function to connect these defined Ranges, Rng1 and
Rng2??
Thanks for response






All times are GMT +1. The time now is 05:13 PM.

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