nhatthai
Thành viên thường trực
- Tham gia
- 16/7/07
- Bài viết
- 221
- Được thích
- 132
- Nghề nghiệp
- Quản lý dạy nghề
NHỜ CÁC BÁC TẠO HỘ ADD-IN CODE SAU ĐỂ CÓ THỂ SỬ DỤNG ĐƯỢC VỚI MỌI FILE EXCEL (CODE TOI NHỜ CÁC BẠN TRONG DIỄN ĐÀN EX)
PHP Code:
PHP Code:
---------------------------------------------
CÁC BÁC ĐỪNG CHE TÔI DỞ NHÉ, TÔI CHƯA TÌM HIỀU VẤN ĐỀ NÀY
XIN CẢM ƠN!
PHP Code:
-------------------------------------------------------DÁN GIÁ TRỊ
Sub Dan()
Dim Dong As Integer
Dim Day As Range
Dong = WorksheetFunction.Max(Range("B8:B65536")) - 1
Set Day = Selection
Range(Cells(8, Day.Column), Cells(8, Day.Column + Day.Count - 1)).Select
If Selection.HasFormula Then
Selection.Copy
Range(ActiveCell.Offset(1, 0), ActiveCell.Offset(Dong, 0)).Select
Selection.PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Else
MsgBox ("Khong phai cong thuc.Ban chon o dau trong cot mau xanh roi thuc hien lai")
End If
End Sub
Sub Dan()
Dim Dong As Integer
Dim Day As Range
Dong = WorksheetFunction.Max(Range("B8:B65536")) - 1
Set Day = Selection
Range(Cells(8, Day.Column), Cells(8, Day.Column + Day.Count - 1)).Select
If Selection.HasFormula Then
Selection.Copy
Range(ActiveCell.Offset(1, 0), ActiveCell.Offset(Dong, 0)).Select
Selection.PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Else
MsgBox ("Khong phai cong thuc.Ban chon o dau trong cot mau xanh roi thuc hien lai")
End If
End Sub
PHP Code:
---------------------------------------------------------DÁN CÔNG THU+ C
Sub DDan()
Dim Dong As Integer
Dim Day As Range
Dong = WorksheetFunction.Max(Range("A1:A65536")) - 1
Set Day = Selection
Range(Cells(8, Day.Column), Cells(8, Day.Column + Day.Count - 1)).Select
If Selection.HasFormula Then
Selection.Copy
Range(ActiveCell.Offset(1, 0), ActiveCell.Offset(Dong, 0)).Select
Selection.PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Else
MsgBox ("Khong phai cong thuc.Ban chon o dau trong cot mau xanh roi thuc hien lai")
End If
End Sub
Sub DDan()
Dim Dong As Integer
Dim Day As Range
Dong = WorksheetFunction.Max(Range("A1:A65536")) - 1
Set Day = Selection
Range(Cells(8, Day.Column), Cells(8, Day.Column + Day.Count - 1)).Select
If Selection.HasFormula Then
Selection.Copy
Range(ActiveCell.Offset(1, 0), ActiveCell.Offset(Dong, 0)).Select
Selection.PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Else
MsgBox ("Khong phai cong thuc.Ban chon o dau trong cot mau xanh roi thuc hien lai")
End If
End Sub
---------------------------------------------
CÁC BÁC ĐỪNG CHE TÔI DỞ NHÉ, TÔI CHƯA TÌM HIỀU VẤN ĐỀ NÀY
XIN CẢM ƠN!