| |
▼しんく さん:
> B列
>
>B25 発生時間:
>B26
>B27
>B28
>B29 (表示形式はhhmmです。2012/5/14 18:10と入力されています)
>B30 18:10 aaaaaaaaaaa
B29に2012/5/14 18:10 と入力されているのですか?
上記を無視して
とりあえずB30からの最終行(今回は B30,B34,B38)迄
Sub TESTa()
Dim i As Long
Dim j As Long
Dim sYmd As String
Dim sTime() As String
i = 30
Do While Cells(i, 1).Value <> ""
If i = 30 Then
sYmd = Range("B25").Value & Date
ReDim sTime(j)
sTime(j) = Left(Cells(i, 1).Value, 5)
Else
ReDim Preserve sTime(j)
sTime(j) = Left(Cells(i, 1).Value, 5)
End If
j = j + 1
i = i + 4
Loop
Range("B25").Value = sYmd & " " & Join(sTime, ", ")
End Sub
|
|