How to connect two columns in Excel VBA??

M

mar_male

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
 
D

damorrison

easiest way I know is =A1&" "&B1
I put the quotes in there in case you wanted a space between the text
and string
 
M

mar_male

If this work for all select Range Rng1 and Rng2. If This automaticaly
add all cells??
 
D

damorrison

well, you will have to copy the formula, I am sure there is a code that
can be typed up but is it really worth the time.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top