一部のセルのフォーマットされた内容を数式で連結しようとしています。
純粋な式でそれを解決する方法がわからないので、いくつかの基本的なコードを追加します。
しかし、単一のセルからフォーマットされたテキスト値にアクセスする方法を理解できません。
oCellはセルオブジェクトではなく、セルコンテンツのみのようです。
これを変更するにはどうすればよいですか。oCell.TextやoCell.Stringなどを使用できます...
Function StringSumme(oCellRange )
dim result as String
dim nRow as Integer
result = ""
For nRow = LBound( oCellRange, 1) To UBound( oCellRange, 1 )
For nCol = LBound( oCellRange, 2) To UBound( oCellRange, 2 )
oCell=oCellRange(nRow,1)
result = result + oCell
Next
Next
StringSumme = result
End Function
Excelではこれは機能します
Function StringSumme(bezug As Range) As String
Dim txt As String
Dim ce As Range
txt = ""
For Each ce In bezug.Cells
txt = txt & ce.Text
Next
StringSumme = txt
End Function