Menentukan Tipe Data Pada Excel Secara Otomatis Menggunakan VBA
Table of Contents
Function CellType(pRange As Range)
'Updateby20140625
Application.Volatile
Set pRange = pRange.Range("A1")
Select Case True
Case VBA.IsEmpty(pRange): CellType = "Blank"
Case Application.IsText(pRange): CellType = "Text"
Case Application.IsLogical(pRange): CellType = "Logical"
Case Application.IsErr(pRange): CellType = "Error"
Case VBA.IsDate(pRange): CellType = "Date"
Case VBA.InStr(1, pRange.Text, ":") <> 0: CellType = "Time"
Case VBA.IsNumeric(pRange): CellType = "Value"
End Select
End Function
Ini videonya di Youtube
Post a Comment