Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Merge cells in Excel for my Worksheet

Status
Not open for further replies.

henpat123

Programmer
Apr 14, 2005
35
US
Hi,
I am working on Microsoft Excel and I have atleast 400 rows for which columns E, F and G needs to be merged for all the rows. And this is just a one time thing that needs to be done in my Excel Sheet. I heared that it can be done in VBA..can someone tell me how to accomplish this?

Thanks
henry
 
Try recording a macro, this should get you started.
 
But that won't do it for the 400 rows that I need..right? I thought using VBA we can loop through the rows and somehow merge the cells using the code.
 
It will, what I was suggesting was to record a macro, and look at the code. This would give you a place to start.

 
Merged Cells - YUUKKKKKKK

OK, having done my bit for the prevention of merged cells society, Select E1:G1 and merge them. Now copy that cell, select E2:G400 and paste. Cells are all now merged, row by row.

Note that this is very different to concatenating data, just in case that was what you really meant. Just in case it was, in any other cell eg J1 put =E1&F1&G1 and copy down to J400. Copy Col J, paste special as values and you are done.

Regards
Ken.............

----------------------------------------------------------------------------
[peace]It's easier to beg forgiveness than ask permission[2thumbsup]
----------------------------------------------------------------------------
 
KenWright,
That worked...thanks..no mneed for Macros.

Henry
 
You're welcome :)

----------------------------------------------------------------------------
[peace]It's easier to beg forgiveness than ask permission[2thumbsup]
----------------------------------------------------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top