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")
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)))
Thứ Năm, 2 tháng 7, 2015
Công thức khái toán chi phí xây dựng 1m dài đường giao thông
Nhập các thông số như hình bên, nhấn CALC rồi copy công thức và chuyển đến trang Khái toán nhanh, dán (Paste) công thức vừa copy tiếp tục nhấn CALC để được đơn giá tổng hợp cho 1m dài đường giao thông cần tính.
Đăng ký:
Bài đăng (Atom)