私のコードに問題があります。 Empty Cell
は認識されません。詳細についてはセルが空の場合、条件
条件は、「セルが空の場合、現在のセルの上のセル内のテキストのフォントを変更する他に、リピート」である
Sub lastprice()
Dim price As String
Do
Selection.Find.ClearFormatting
With Selection.Find.Font
.Size = 11
.Bold = True
End With
With Selection.Find
.Text = "last price ("
.Forward = True
.Wrap = wdFindStop
.Format = True
End With
Selection.Find.Execute
If Selection.Find.Found = False Then
Exit Do
Else
Selection.MoveRight Unit:=wdCell
price = Trim(Selection.Text)
If price <> "" Then ' I think there is some problem
Selection.MoveLeft Unit:=wdCell, Count:=2
Selection.Font.Name = "Cambria"
Selection.MoveDown Unit:=wdLine, Count:=1
Else
End If
End If
Loop
End Sub
それが必要
をチェック条件で表の第2画像によって、より精巧な
私はループに関するより具体的な2番目の画像を追加しました –