Howdy! [ Register | Login | Forums ]


This forum was created to help business owners just like you that sell on eBay, Amazon and through your own eCommerce Site, with the simple ethos that:

"Selling an item online is easy, so is a couple of items, but making living from a business that sells online, well that's something different entirely."

I don't pretend to have all the answers and I know that "together we're stronger" and if you consider the wealth of knowledge that we each posses, using this forum can help us all. We each have a huge amount of experience and provide our own perspectives to any questions & challenges that we may have..

Your input, no matter how small is valued
If you've not registered yet, you can do here for free and if you already have registered, sign-in here.

Get help right now

Registration is free and you can ask your question straight away.

PS. It really is Free! Need to do the spam check though :)

Excel Concatenate Function (concat) - Combine Thousands of Cells

Please consider registering
guest

Log In

Register | Lost password?
Advanced Search:

— Forum Scope —



— Match —



— Forum Options —




Wildcard usage:
*  matches any number of characters    %  matches exactly one character

Minimum search word length is 4 characters - maximum search word length is 84 characters

Excel Concatenate Function (concat) - Combine Thousands of Cells
April 17, 2012
2:51 PM
Matthew Ogborne
Guest

Howdy,

I found this a while ago and its exceptionally useful for concatenating thousands of cells together http://chandoo.org/wp/2008/05/…..el-concat/

You can use it like this:

=conact(A1:AAAA1)

Function:

Function concat(useThis As Range, Optional delim As String) As String
‘ this function will concatenate a range of cells and return one string
‘ useful when you have a rather large range of cells that you need to add up
Dim retVal, dlm As String
retVal = “”
If delim = Null Then
dlm = “”
Else
dlm = delim
End If
For Each cell In useThis
if cstr(cell.value)”" and cstr(cell.value)” ” then
retVal = retVal & cstr(cell.Value) & dlm
end if
Next
If dlm “” Then
retVal = Left(retVal, Len(retVal) – Len(dlm))
End If
concat = retVal
End Function

Enjoy

Matt

March 26, 2013
7:27 PM
crwilson
Member
Forum Posts: 25
Member Since:
July 18, 2012
Offline

Interesting. Do you have an example of where this would be useful in merging inventory data?

March 28, 2013
12:02 PM
Matthew Ogborne
Admin
Forum Posts: 218
Member Since:
September 24, 2010
Offline

Hola,

Yes, when you hit the cell text or formula limit in a single cell, use the above.

It’s not so much of a problem in Excel 2007 as they made the formula lengths much longer, but when you need to concatenate hundreds if not thousands of cells together, this works amazingly.

I used this on a parts compatibility database as it was easier and more maintainable for a client which had around 2800 separate cells to join up.

Matt


Most Users Ever Online: 298

Currently Online:
11 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Newest Members: Xavier, David Daen, nic_ism, Michelle Arnold, dealline, ojilcasi, leemcv, bighomeuk, Phil Taylor, dogendorf, Beckie Sims, Andy Womack, da, Piano, NiSo

Administrators: Dave Furness (71), Matthew Ogborne (218)