Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / April 2007

Tip: Looking for answers? Try searching our database.

Concatenation Question

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jay - 13 Apr 2007 13:38 GMT
Hi,

I have 100 row, single column list of text strings.  I am wanting to
concatenate all these together, but with " Or Like " between each string.
This is to enable me to prepare a long criteria expression for Access
without all the re-typing.

And for the life of me I can't think of a simple, quick way.

Any help greatly appreciated.

Jason
Roger Govier - 13 Apr 2007 14:12 GMT
Hi

Check out JE McGimpsey's Multcat function
http://www.mcgimpsey.com/excel/udfs/multicat.html

If you use " or Like " as your delimiter, it should work fine.
Signature

Regards

Roger Govier

> Hi,
>
[quoted text clipped - 8 lines]
>
> Jason
Gord Dibben - 13 Apr 2007 20:00 GMT
Jay

Sub ConCat_Cells()
Dim x As Range
Dim y As Range
Dim z As Range
Dim w As String
Dim sbuf As String
   On Error GoTo endit
   w = InputBox("Enter the Type of De-limiter Desired")
   Set z = Application.InputBox("Select Destination Cell", _
           "Destination Cell", , , , , , 8)
  Application.SendKeys "+{F8}"
  Set x = Application.InputBox("Select Cells...Contiguous or Non-Contiguous", _
           "Cells Selection", , , , , , 8)
   For Each y In x
       If Len(y.text) > 0 Then sbuf = sbuf & y.text & w
   Next
   z = Left(sbuf, Len(sbuf) - 1)
   Exit Sub
endit:
   MsgBox "Nothing Selected.  Please try again."
End Sub

In de-limiter inputbox enter <space>or like<space>

>Hi,
>
[quoted text clipped - 8 lines]
>
>Jason
Jay - 14 Apr 2007 13:37 GMT
Thanks Guys, most appreciated.  I've installed the UDF into my UDF
module & will be trying your vb as well Cord.  Many thanks,

Jason

> Jay
>
[quoted text clipped - 34 lines]
>>
>> Jason

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.