20/12/11 08:01:05.41 xHfuP7vB0.net
>>952
0以外の数値も文字列に含めて、空白を停止フラグにした
これであってる?
Dim LastValue
LastValue = "未入力"
Dim Row As Range
For Each Row In Range("A:B").Rows 'A:B範囲を一行ずつ
Dim AColumn As Range, BColumn As Range
Set AColumn = Row.Columns(1) '処理中の行の一列目をAColumn
Set BColumn = Row.Columns(2) '処理中の行の二列目をBColumn
If (AColumn.Value = "") Then Exit For '空白で停止
If (AColumn.Value Like "なし") Then
If (BColumn = Empty) Then BColumn.Value = LastValue
ElseIf (AColumn.Value <> 0) Then
LastValue = AColumn.Value
End If
Next