●EXCEL・VBAの教えて ..
[2ch|▼Menu]
138:デフォルトの名無しさん
07/02/02 00:21:04
>>136
サンクス。職場では恥かかんよう気をつけるよー。

>>137
Option Explicit
Option Base 1

Sub testTwo()
Dim rng As Range
Dim outRng As Range
Dim data() As Variant
Dim cnt As Long
Dim outCnt As Long
Set rng = ActiveSheet.Range("B1")
cnt = 1
Do While rng.Row <= 10
If rng.Value = "0:00" Then
ReDim Preserve data(cnt)
data(cnt) = rng.Offset(0, -1).Value
cnt = cnt + 1
End If
Set rng = rng.Offset(1)
Loop
Set outRng = ActiveWorkbook.Worksheets("潮位").Range("D1")
For outCnt = 1 To cnt - 1
outRng.Value = data(outCnt)
Set outRng = outRng.Offset(1)
Next
End Sub

とりあえずD列に出してみた。
別シートに出力の際は潮位のところをそのシート名に変更すればよし、あとそのとなりをA1にするとA列にでる。


次ページ
最新レス表示
スレッドの検索
類似スレ一覧
話題のニュース
おまかせリスト
▼オプションを表示
暇つぶし2ch

5376日前に更新/123 KB
担当:undef