返回列表 上一主題 發帖

一個期限顯示問題

回復 4# 317
  1. Sub ex()
  2. ym = InputBox("輸入入貨年月", , 201308)
  3. For Each a In Range("H:H").SpecialCells(xlCellTypeConstants)
  4.    If IsDate(a) Then
  5.       If Format(Cells(a.Row, "B"), "yyyymm") = ym Then
  6.          mystr = IIf(mystr = "", Cells(a.Row, "B").Text & " " & Cells(a.Row, "C") & "到期日" & a.Text, mystr & Chr(10) & Cells(a.Row, "B").Text & " " & Cells(a.Row, "C") & "到期日" & a.Text)
  7.       End If
  8.    End If
  9. Next
  10. MsgBox mystr
  11. End Sub
複製代碼
學海無涯_不恥下問

TOP

        靜思自在 : 人的眼睛長在前面,只看到別人的缺點,絲毫看不到自己的缺點。
返回列表 上一主題