View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.misc
Claus Busch Claus Busch is offline
external usenet poster
 
Posts: 3,872
Default User-defined concatenation

Hi Frank,

Am Tue, 30 Jun 2015 07:36:24 -0400 schrieb Phrank:

Ah, I see. That makes sense. I've run into a (hopefully minor) snag
with implementation, though. There's a blank line between rows 3 and
4, as shown below (blocks off groups of info (not my formatting, but I
have to work with it). Would I just account for a blank cell in A(i)
and have the loop press on, like below?


if a block always has 4 filled rows you only have to change
myRng.Rows.Count to 4:

Function Title(myRng As Range) As String
Dim i As Long, myStr As String

For i = 1 To 4
myStr = myStr & "-" & _
Evaluate("=VLOOKUP(" & i & "," & myRng.Address & ",3,0)")
Next
Title = Mid(myStr, 2)
End Function

and call the function into the sheet then with:
=Title(A1:C5)


Regards
Claus B.
--
Vista Ultimate / Windows7
Office 2007 Ultimate / 2010 Professional