| 
    
     |  | ▼ピンク さん: >参考に
 >Sub Test6()
 >  Dim myRow As Long, i As Long, j As Long
 >  myRow = 2: j = 9
 >  Do Until myRow > 10
 >    If Cells(myRow, "B").Value = 0 Or Cells(myRow, "B").Value = "" Then
 >      myRow = myRow + 1
 >    ElseIf Cells(myRow, "B").Value > 0 And Cells(myRow, "U").Value > 0 Then
 >      myRow = myRow + 1
 >    ElseIf Cells(myRow, "U").Value = 0 Or Cells(myRow, "U").Value = "" Then
 >      For i = myRow To j
 >        Cells(i + 1, 1).Resize(, 23).Copy Cells(i, 1)
 >      Next
 >      Cells(j + 1, 1).Resize(, 23).ClearContents
 >      Cells(j + 1, "G").FormulaR1C1 = "=RC[-5]*8%"
 >      Cells(j + 1, "K").FormulaR1C1 = "=RC[-9]+RC[-4]"
 >      Cells(j + 1, "U").FormulaR1C1 = "=RC[-10]-RC[-4]"
 >      j = j - 1
 >    End If
 >  Loop
 >  MsgBox "終わり"
 >End Sub
 
 ピンクさん、参考のコードをかいていただきましてたいへんありがとうございました。とてもうまくいきました。もっと勉強するように努力します。
 本当にありがとうございました。
 
 
 |  |