返回列表 上一主題 發帖

一個期限顯示問題

回復 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

        靜思自在 : 【生命在呼吸間】佛陀說:「生命在呼吸間。」人無法管住自己的生命,更無法擋住死期,讓自己永住人間。既然生命去來這麼無常,我們更應該好好地愛惜它、利用它、充實它,讓這無常、寶貴的生命,散發它真善美的光輝,映照出生命真正的價值。
返回列表 上一主題