回覆列表
  • 1 # 使用者7063786766555

    寫函式判斷啊:

    Function CellType(pRange As Range)

    Application.Volatile

    Set pRange = pRange.Range("A1")

    Select Case True

    Case VBA.IsEmpty(pRange): CellType = "空白"

    Case Application.IsText(pRange): CellType = "文字"

    Case Application.IsLogical(pRange): CellType = "邏輯"

    Case Application.IsErr(pRange): CellType = "錯誤"

    Case VBA.IsDate(pRange): CellType = "日期"

    Case VBA.InStr(1, pRange.Text, ":") <> 0: CellType = "時間"

    Case VBA.IsNumeric(pRange): CellType = "常規數值"

    End Select

    End Function

  • 中秋節和大豐收的關聯?
  • 小程式開發者工具使用教程,開發者工具怎麼使用?