Hello,
I currently use
=CONCATENATE(A1," : ",B1," : ",C1) or
=ConcRange(A1:C1, " : ")
so that the contents of cells A1, B1 and C1 will display in D1 with a " : " between them.
Does anyone have or can anyone tell me of a macro that I can use that will take whatever I enter in various columns (let's say up to 10 columns) and combine the data to show only the final concatenation that includes the " :" between the content of each cell? It should skip empty columns and apply to all data filled rows in the spreadsheet.
Thanks.
Something like this UDF:
Public Function guggsconcatenate(rng As Range) Dim c As Object Dim strT As String For Each c In rng.Cells If c.Value <> "" Then strT = strT & c.Value & ":" End If Next c guggsconcatenate = Left(strT, Len(strT) - 1) End Function
Is your code running too slowly?
Does your workbook or database have a bunch of duplicate pieces of data?
Have a look at this article to learn the best ways to set up your projects.
It will save both time and effort in the long run!
Dave
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks