|
まだ 完成していませんが、下記で何とかなりそうです
ありがとうございました
今後もよろしくお願いいたします
Sub try8()
Dim myRng As Range
Dim mystr As String, celad As String, mystr2 As String
Dim mycell As Range
Dim i As Long
Dim tg_v As String
Range("B1:H5").Select
Set myRng = Selection
For i = 0 To myRng.Rows.Count
mystr = ""
For Each mycell In myRng.Resize(1).Offset(i)
If mycell.HorizontalAlignment = 7 Then
mystr = mystr & mycell.Address(0, 0) & ","
If IsEmpty(mycell.Offset(0, 1).Value) <> True Then
If mystr <> "" Then
Debug.Print mystr
mystr = ""
End If
End If
Else
If mystr <> "" Then
Debug.Print mystr
mystr = ""
End If
End If
Next
If mystr <> "" Then
Debug.Print mystr
End If
Next
Set myRng = Nothing
End Sub
|
|