Function join(r As Range, sep As String) As String Dim result As String Dim c As Range For Each c In r If c.Value <> "" Then result = result & c.Value & sep End If Next c If Len(result) = 0 Then join = "" Else join = Left(result, Len(result) - Len(sep)) End If End Function
指定した文字列を含むセルを検索する関数
Function FINDCELL(r As Range, str As String) As Object Dim theCell As Object Set theCell = r.Cells.Find(str, LookAt:=xlPart) If theCell Is Nothing Then Set FINDCELL = Nothing Else Set FINDCELL = theCell End If End Function
.bat, .wsh, .vbs
vbsだけ使えることがわかった.