How to merge excel using vba

L

Lillian

I have big excel spreed sheet, on the columnD is street
#,on the columnE is direction, on the columnF is street
name, example:
D E F
123 S Main street
223 N Hill street

how can I merge DEF together become 123 S main street by
using VBA macro.

thanks.

Lillian
 
A

Anders S

Lillian,

In column G (or anywhere), enter
=D1&" "&E1&" "&F1
That is a worksheet formula.

If you need a VBA macro, you have to provide more details.

HTH
Anders Silvén
 
G

Guest

I have excel spreed sheet about 50,000 records, all the
addresss in spred in three column, example:
D E F

123 S main street
123 N Hill street
222 W Broadway

so three columns have different address, now I need to
merge to one big column like columnG, (123 S main street),
then removed data from D E F columns, how to write the
macro to do that.

thanks.

Lillian
 
L

Lillian

I did try your formula, the all the data is in columnG,
but if I try to delete D,E.F column, then G column
become no readable, because is point to =D1&" "&E1&" "&F1
, so I have to hide the D,E.F column, it's ok, but look
funny on the database, the best way is using VBA code, do
you know how to do that, I really appreciated it.


Lillian
 
D

Darren Hill

You can get around the deletion problem as follows:

Select Column G, and click Copy.
(Don't change the selection)
Then Edit menu -> Paste Special -> Values

Darren

I did try your formula, the all the data is in columnG,
but if I try to delete D,E.F column, then G column
become no readable, because is point to =D1&" "&E1&" "&F1
, so I have to hide the D,E.F column, it's ok, but look
funny on the database, the best way is using VBA code, do
you know how to do that, I really appreciated it.


Lillian
 
L

Lillian

Darren:

Now I hide my D,E,F columns, I do not know how to
unhide, those columns is gone, how did I put back.

Lillian
 
D

Darren Hill

Select Columns C to G (so that the hidden D-F columns are within the
selected area).
Then go to Format menu -> Column -> Unhide.

Darren

Darren:

Now I hide my D,E,F columns, I do not know how to
unhide, those columns is gone, how did I put back.

Lillian
 
L

Lillian

Thanks I got it.
-----Original Message-----
Select Columns C to G (so that the hidden D-F columns are within the
selected area).
Then go to Format menu -> Column -> Unhide.

Darren

Darren:

Now I hide my D,E,F columns, I do not know how to
unhide, those columns is gone, how did I put back.

Lillian


.
 
D

Dave Peterson

And you have another reply to your other post, too.

It's a macro solution that would take longer than what you did with the
worksheet formulas <vbg>.
 

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