Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Thanks Gord for your time and interest!
Much appreciated I will try you solution now Regards Michael Gord Dibben wrote: UDF................. Function ConCatRange(CellBlock As Range) As String Dim Cell As Range Dim sbuf As String For Each Cell In CellBlock If Len(Cell.text) 0 Then sbuf = sbuf & Cell.text & "" Next ConCatRange = Left(sbuf, Len(sbuf) - 1) End Function =ConCatRange(C40:Q40) Macro.......................... 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 a De-limiter if 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) - Len(w)) Exit Sub endit: MsgBox "Nothing Selected. Please try again." End Sub Gord Thanks very much Gord and Don [quoted text clipped - 27 lines] Michael -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...tions/200712/1 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how to copy the first word or two words from a cell containing a complete sentence to another cell | Excel Discussion (Misc queries) | |||
Extract two letters | Excel Discussion (Misc queries) | |||
Extract letters from a cell | Excel Worksheet Functions | |||
Extract bold letters in a cell | Excel Worksheet Functions | |||
Extract bold letters in a cell | Excel Worksheet Functions |