Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #7  
Old 03-25-2015, 10:22 AM
Snakehips Snakehips is offline concantenate cells in multiple row Windows 8 concantenate cells in multiple row Office 2013
Advanced Beginner
 
Join Date: Mar 2015
Posts: 36
Snakehips is on a distinguished road
Default

If you are using Excel 2007 + then you can have 32,767 characters per cell although Excel cannot display that many characters.

Assuming your data starts A1 and column B is available then the following will concatenate column A data, separated by a semi-colon, in cells B1:B??. Each cell will hold approx 32000 characters.

Right click your sheet tab >> View Code and paste the below into the code pane.

Code:
Sub con()
Application.ScreenUpdating = False
lr = Cells(Rows.Count, 1).End(xlUp).Row
Set Rng = Range("B1")

For r = 1 To lr
Rng.Value = Rng.Value & ";" & Range("A" & r).Value
If Len(Rng.Value) > 32000 Then Set Rng = Rng.Offset(1, 0)
Next r
End Sub





I processed 120000 rows in under 1 minute.

When done, select the range B1:B?? Copy and paste into a word document.

Hope that helps.
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
concantenate cells in multiple row Get multiple cells in separate worksheet kerkstrt Excel 1 10-26-2014 11:20 PM
Link multiple cells in drop-down lists Trial4life Excel 0 09-08-2014 05:08 AM
Counting cells with multiple complex criteria TishyMouse Excel 12 12-06-2012 05:05 AM
concantenate cells in multiple row How to merge multiple records into one and update the cells mag Excel 1 10-30-2012 01:11 AM
concantenate cells in multiple row Multiple VLOOKUP's checking multiple Cells OTPM Excel 11 05-23-2011 11:18 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:50 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft