Mở VBA: add funtion này vào và sử dụng như công thức:
Function này sẽ dùng khá nhiều, tham khảo bài tạo add-in lưu trữ Function: Tạo Add-in
Function GetNumeric(CellRef As String)
Dim StringLength As Integer
StringLength = Len(CellRef)
For i = 1 To StringLength
If IsNumeric(Mid(CellRef, i, 1)) Then Result = Result & Mid(CellRef, i, 1)
Next i
GetNumeric = Result
End Function
Kết quả:
Nhận xét
Đăng nhận xét