Copy đoạn code bên dưới :
Function CALVALUE(expr As String) As Double
Dim place As Integer
Dim Temp, Excal
place = InStr(expr, ":")
If place > 0 Then
expr = Mid(expr, place + 1)
Set Temp = CreateObject("VBScript.RegExp")
Hiển thị các bài đăng có nhãn Thư viện Hàm. Hiển thị tất cả bài đăng
Hiển thị các bài đăng có nhãn Thư viện Hàm. Hiển thị tất cả bài đăng
Thứ Năm, 17 tháng 9, 2015
Chủ Nhật, 26 tháng 7, 2015
Hàm nội suy 2 chiều trong Excel
Copy đoạn code bên dưới :
Function INTER2D(table As Range, vrow As Double, vcol As Double)
On Error Resume Next
r = table.Rows.Count: c = table.Columns.Count: i = 2: j = 2
If (vrow > table.Cells(r, 1).Value) Or (vrow < table.Cells(2, 1).Value) _
Or (vcol > table.Cells(1, c).Value) Or (vcol < table.Cells(1, 2).Value) _
Then
result = "OUTSIDE"
Else
Function INTER2D(table As Range, vrow As Double, vcol As Double)
On Error Resume Next
r = table.Rows.Count: c = table.Columns.Count: i = 2: j = 2
If (vrow > table.Cells(r, 1).Value) Or (vrow < table.Cells(2, 1).Value) _
Or (vcol > table.Cells(1, c).Value) Or (vcol < table.Cells(1, 2).Value) _
Then
result = "OUTSIDE"
Else
Thứ Bảy, 25 tháng 7, 2015
Hàm SPLIT và UBOUND trong AutoLisp
Copy đoạn code bên dưới :
(defun Split(strg find)
(vl-load-com)
(setq len (strlen find) lis nil)
(while (setq num (vl-string-search find strg))
(setq lis (append lis (list(substr strg 1 num)))
strg(substr strg (+ num len 1))
num (vl-string-search find strg)))
(append lis (list strg)))
(defun Split(strg find)
(vl-load-com)
(setq len (strlen find) lis nil)
(while (setq num (vl-string-search find strg))
(setq lis (append lis (list(substr strg 1 num)))
strg(substr strg (+ num len 1))
num (vl-string-search find strg)))
(append lis (list strg)))
Đăng ký:
Bài đăng (Atom)
