qua kho de giai thich can ke
mình cần hiểu và làm theo nhưng ko biết cách đọc các bạn giúp mình với.
Sub SAVING_data()
If Cells.Find(What:=BL_NO, After:=ActiveCell, LookIn:=xlValues, _
LookAt:=xlWhole, SearchOrder:=xlByColumns, SearchDirection:=xlNext, _
MatchCase:=False) Is Nothing Then
Selection.End(xlDown).Select
ActiveCell.Offset(1, 0).Range("A1").Select
Else
Cells.Find(What:=BL_NO, After:=ActiveCell, LookIn:=xlValues, _
LookAt:=xlWhole, SearchOrder:=xlByColumns, SearchDirection:=xlNext, _
MatchCase:=False).Activate
End If
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
ActiveCell.Select
ActiveWorkbook.Save
End Sub
Sub SAVE_Bien_ban()
BL_NO = Range("s5")
If BL_NO = "" Then
MsgBox ("Yeu cau nhap so BIEN BAN vao S5")
Exit Sub
End If
Range("'Link'!A2:AZ2").Copy
Sheets("Data").Select
Range("A1").Select
Application.Run ("SAVING_data")
Sheets("Bien ban").Select
End Sub
Sub VIEW_bien_ban()
So_xem = Range("a1")
cotdl = 1
Range("s5") = Application.Index(Range("data!a3:az10000"), So_xem, cotdl)
cotdl = cotdl + 1
Cells(11, 7) = Application.Index(Range("data!a3:az10000"), So_xem, cotdl)
cotdl = cotdl + 1
Cells(13, 15) = Application.Index(Range("data!a3:az10000"), So_xem, cotdl)
cotdl = cotdl + 1
Cells(14, 15) = Application.Index(Range("data!a3:az10000"), So_xem, cotdl)
cotdl = cotdl + 1
Cells(15, 15) = Application.Index(Range("data!a3:az10000"), So_xem, cotdl)
cotdl = cotdl + 1
Range("f19") = Application.Index(Range("data!a3:az10000"), So_xem, cotdl)
cotdl = cotdl + 1
Range("o19") = Application.Index(Range("data!a3:az10000"), So_xem, cotdl)
cotdl = cotdl + 1
Range("u19") = Application.Index(Range("data!a3:az10000"), So_xem, cotdl)
cotdl = cotdl + 1
Range("f20") = Application.Index(Range("data!a3:az10000"), So_xem, cotdl)
cotdl = cotdl + 1
Range("o20") = Application.Index(Range("data!a3:az10000"), So_xem, cotdl)
cotdl = cotdl + 1
Range("u20") = Application.Index(Range("data!a3:az10000"), So_xem, cotdl)
cotdl = cotdl + 1
For hang = 21 To 29
For cot = 12 To 13
Cells(hang, cot) = Application.Index(Range("data!a3:az10000"), So_xem, cotdl)
cotdl = cotdl + 1
Next cot
Next hang
cotdl = 30
For hang = 30 To 37
Cells(hang, 12) = Application.Index(Range("data!a3:az10000"), So_xem, cotdl)
cotdl = cotdl + 1
Next hang
Range("f5").Select
End Sub
Sub Nhap_Bien_ban_moi()
Sheets("data").Select
Range("a1").Select
Selection.End(xlDown).Select
Bien_ban_moi_so = ActiveCell.Row() - 1
Sheets("Bien ban").Select
Range("g11") = Now()
If Range("a5") = "" Then
MsgBox ("Yeu cau chon LOAI BIEN BAN CAN NHAP roi nhap tiep sau")
Exit Sub
End If
If Range("a5") = 1 Then
Range("S5") = "GX-" & Year(Now) & "-" & Bien_ban_moi_so
Else
If Range("a5") = 2 Then
Range("S5") = "NX-" & Year(Now) & "-" & Bien_ban_moi_so
End If
End If
Range("o15:S15,F19:K20,o19:r20,u19:u20,l21:l29,l21:u29,l30:u35").ClearContents
Range("A6").Select
End Sub