queluatb
Thành viên thường trực
- Tham gia
- 17/1/11
- Bài viết
- 347
- Được thích
- 41
hiện e thấy from cho sửa chữa, còn nhập mới e thử mấy cách nhưng chưa thấy sửa trên BCC, có lẽ e thực hiện thao tác chưa chính xác, a chỉ giúp e với. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Dim Ar0(): Dim lbID As Integer
Dim Sh As Worksheet
Private Sub CmdLuuCong_Click()
Dim Rng As Range, sRng As Range
Dim Rw As Long, Rws As Long
Dim MaNV As String, MyAdd As String
Rw = Me!tbDg.Value: MaNV = Me!tbMaNV.Text
Set Sh = Sheets("BCC")
Rws = Sh.[b7].CurrentRegion.Rows.Count
Set Rng = Sh.[b7].Resize(Rws)
Set sRng = Rng.Find(MaNV, , xlFormulas, xlWhole)
If sRng Is Nothing Then
MsgBox "Nothing."
Else
MyAdd = sRng.Address
Do
If sRng.Row = Rw Then
gpeGOP Rw
Exit Do
End If
Set sRng = Rng.FindNext(sRng)
Loop While Not sRng Is Nothing And sRng.Address <> MyAdd
End If
End Sub
Sub gpeGOP(Rw As Long)
Sh.Cells(Rw, "F").Value = Me!tbN01.Text: Sh.Cells(Rw, "G").Value = Me!tbN02.Text
Sh.Cells(Rw, "H").Value = Me!tbN03.Text: Sh.Cells(Rw, "I").Value = Me!tbN04.Text
Sh.Cells(Rw, "J").Value = Me!tbN05.Text: Sh.Cells(Rw, "K").Value = Me!tbN06.Text
Sh.Cells(Rw, "L").Value = Me!tbN07.Text: Sh.Cells(Rw, "M").Value = Me!tbN08.Text
Sh.Cells(Rw, "N").Value = Me!tbN09.Text: Sh.Cells(Rw, "O").Value = Me!tbN10.Text
Sh.Cells(Rw, "P").Value = Me!tbN11.Text: Sh.Cells(Rw, "Q").Value = Me!tbN12.Text
Sh.Cells(Rw, "R").Value = Me!tbN13.Text: Sh.Cells(Rw, "S").Value = Me!tbN14.Text
Sh.Cells(Rw, "T").Value = Me!tbN15.Text: Sh.Cells(Rw, "U").Value = Me!tbN16.Text
Sh.Cells(Rw, "V").Value = Me!tbN17.Text: Sh.Cells(Rw, "W").Value = Me!tbN18.Text
Sh.Cells(Rw, "X").Value = Me!tbN19.Text: Sh.Cells(Rw, "Y").Value = Me!tbN20.Text
Sh.Cells(Rw, "Z").Value = Me!tbN21.Text: Sh.Cells(Rw, 27).Value = Me!tbN22.Text
Sh.Cells(Rw, 28).Value = Me!tbN23.Text: Sh.Cells(Rw, 29).Value = Me!tbN24.Text
Sh.Cells(Rw, 30).Value = Me!tbN25.Text: Sh.Cells(Rw, 31).Value = Me!tbN26.Text
Sh.Cells(Rw, 32).Value = Me!tbN27.Text: Sh.Cells(Rw, 33).Value = Me!tbN28.Text
Sh.Cells(Rw, 34).Value = Me!tbN29.Text: Sh.Cells(Rw, 35).Value = Me!tbN30.Text
Sh.Cells(Rw, 36).Value = Me!tbN31.Text
MsgBox "Nhâp Xong Du Liêu"
Me!tbN01.Text = Space(0): Me!tbN02.Text = Space(0): Me!tbN03.Text = Space(0)
Me!tbN04.Text = Space(0): Me!tbN05.Text = Space(0): Me!tbN06.Text = Space(0)
Me!tbN07.Text = Space(0): Me!tbN08.Text = Space(0): Me!tbN09.Text = Space(0)
Me!tbN10.Text = Space(0): Me!tbN11.Text = Space(0): Me!tbN12.Text = Space(0)
Me!tbN13.Text = Space(0): Me!tbN14.Text = Space(0): Me!tbN15.Text = Space(0)
Me!tbN16.Text = Space(0): Me!tbN17.Text = Space(0): Me!tbN18.Text = Space(0)
Me!tbN19.Text = Space(0): Me!tbN20.Text = Space(0): Me!tbN21.Text = Space(0)
Me!tbN22.Text = Space(0): Me!tbN23.Text = Space(0): Me!tbN24.Text = Space(0)
Me!tbN25.Text = Space(0): Me!tbN26.Text = Space(0): Me!tbN27.Text = Space(0)
Me!tbN28.Text = Space(0): Me!tbN29.Text = Space(0): Me!tbN30.Text = Space(0)
Me!tbN31.Text = Space(0):
End Sub
thực sự là e chưa hiểu hết ý của a chứ e có lập lờ gì đâu a: như e đã nói thực tế bên e thường copy bảng chấm công từ tháng trước sang tháng sau, bộ phận nào cần thêm người thì e insert để thêm bộ phận nào luân chuyển thì sẽ xóa dòng đó đi, ở đây e thấy from của a có đã tạo giúp e việc sửa lại ngày công. Như vậy theo e hiểu là e vẫn thêm hoặc xóa người ở bộ phận nào thêm người hoặc luân chuyển sang bộ phận khácHình như bạn đang cố tình lập lờ giữa sửa dòng dữ liệu cũ với việc nhập dòng dữ liệu mới
Nếu cứ vậy thì xin tạm biệt bạn!
Mã:Dim Ar0(): Dim lbID As Integer Dim Sh As Worksheet Private Sub CmdLuuCong_Click() Dim Rng As Range, sRng As Range Dim Rw As Long, Rws As Long Dim MaNV As String, MyAdd As String Rw = Me!tbDg.Value: MaNV = Me!tbMaNV.Text Set Sh = Sheets("BCC") Rws = Sh.[b7].CurrentRegion.Rows.Count Set Rng = Sh.[b7].Resize(Rws) Set sRng = Rng.Find(MaNV, , xlFormulas, xlWhole) If sRng Is Nothing Then MsgBox "Nothing." Else MyAdd = sRng.Address Do If sRng.Row = Rw Then gpeGOP Rw Exit Do End If Set sRng = Rng.FindNext(sRng) Loop While Not sRng Is Nothing And sRng.Address <> MyAdd End If End Sub
PHP:Sub gpeGOP(Rw As Long) Sh.Cells(Rw, "F").Value = Me!tbN01.Text: Sh.Cells(Rw, "G").Value = Me!tbN02.Text Sh.Cells(Rw, "H").Value = Me!tbN03.Text: Sh.Cells(Rw, "I").Value = Me!tbN04.Text Sh.Cells(Rw, "J").Value = Me!tbN05.Text: Sh.Cells(Rw, "K").Value = Me!tbN06.Text Sh.Cells(Rw, "L").Value = Me!tbN07.Text: Sh.Cells(Rw, "M").Value = Me!tbN08.Text Sh.Cells(Rw, "N").Value = Me!tbN09.Text: Sh.Cells(Rw, "O").Value = Me!tbN10.Text Sh.Cells(Rw, "P").Value = Me!tbN11.Text: Sh.Cells(Rw, "Q").Value = Me!tbN12.Text Sh.Cells(Rw, "R").Value = Me!tbN13.Text: Sh.Cells(Rw, "S").Value = Me!tbN14.Text Sh.Cells(Rw, "T").Value = Me!tbN15.Text: Sh.Cells(Rw, "U").Value = Me!tbN16.Text Sh.Cells(Rw, "V").Value = Me!tbN17.Text: Sh.Cells(Rw, "W").Value = Me!tbN18.Text Sh.Cells(Rw, "X").Value = Me!tbN19.Text: Sh.Cells(Rw, "Y").Value = Me!tbN20.Text Sh.Cells(Rw, "Z").Value = Me!tbN21.Text: Sh.Cells(Rw, 27).Value = Me!tbN22.Text Sh.Cells(Rw, 28).Value = Me!tbN23.Text: Sh.Cells(Rw, 29).Value = Me!tbN24.Text Sh.Cells(Rw, 30).Value = Me!tbN25.Text: Sh.Cells(Rw, 31).Value = Me!tbN26.Text Sh.Cells(Rw, 32).Value = Me!tbN27.Text: Sh.Cells(Rw, 33).Value = Me!tbN28.Text Sh.Cells(Rw, 34).Value = Me!tbN29.Text: Sh.Cells(Rw, 35).Value = Me!tbN30.Text Sh.Cells(Rw, 36).Value = Me!tbN31.Text MsgBox "Nhâp Xong Du Liêu" Me!tbN01.Text = Space(0): Me!tbN02.Text = Space(0): Me!tbN03.Text = Space(0) Me!tbN04.Text = Space(0): Me!tbN05.Text = Space(0): Me!tbN06.Text = Space(0) Me!tbN07.Text = Space(0): Me!tbN08.Text = Space(0): Me!tbN09.Text = Space(0) Me!tbN10.Text = Space(0): Me!tbN11.Text = Space(0): Me!tbN12.Text = Space(0) Me!tbN13.Text = Space(0): Me!tbN14.Text = Space(0): Me!tbN15.Text = Space(0) Me!tbN16.Text = Space(0): Me!tbN17.Text = Space(0): Me!tbN18.Text = Space(0) Me!tbN19.Text = Space(0): Me!tbN20.Text = Space(0): Me!tbN21.Text = Space(0) Me!tbN22.Text = Space(0): Me!tbN23.Text = Space(0): Me!tbN24.Text = Space(0) Me!tbN25.Text = Space(0): Me!tbN26.Text = Space(0): Me!tbN27.Text = Space(0) Me!tbN28.Text = Space(0): Me!tbN29.Text = Space(0): Me!tbN30.Text = Space(0) Me!tbN31.Text = Space(0): End Sub
ở from nhập liệu hiện tại e mới thấy có hai vấn đề:Thêm hướng nhập dòng dữ liệu mới:
Phần khác (trang tính) nào bạn cần thay đổi nhất?a xem giúp e sang các phần khác với ạ
Theo trình tự sẽ tính đến sản lượng sản phẩm hoàn thànhPhần khác (trang tính) nào bạn cần thay đổi nhất?
Hay là theo trình tự công tác thì chúng ta cần xử đến chàng nào trong nớ?
Vấn đề là dữ liệu ban đầu của chúng đang ở trang nào?Theo trình tự sẽ tính đến sản lượng sản phẩm hoàn thành
- Tính được lương doanh thu theo ngày của từng bộ phận
- Tính ra được lương doanh thu của từng người theo từng hệ số
Dữ liệu ban đầu lương doanh thu hiện tại đang nằm trên BCC cột AO, tại cột này e đối chiếu với bảng hệ số tiền lương và sản lượng trong tháng để nhập lại vào hệ số của từng người và từng bộ phậnVấn đề là dữ liệu ban đầu của chúng đang ở trang nào?
Dữ liệu trong cột AQ hay QO của 'BCC' làm gì có doanh thu?Dữ liệu ban đầu lương doanh thu hiện tại đang nằm trên BCC cột AO, tại cột này e đối chiếu với bảng hệ số tiền lương và sản lượng trong tháng để nhập lại vào hệ số của từng người và từng bộ phận
Bạn sẽ phải chờ ngưới khác giúp vì đưa thông tin thiếu chính xác & tạm biệt bạn!
[/QUOTE
Bảng lương e làm như nào e gửi y nguyên như thế, thực sự e k hiểu e bị thiếu gì,trước đến giờ e đều làm theo Công thức trong file như vậy chứ có đưa thiếu gì đâu
à do e đưa nhầm cột đáng lẽ là AR lại đưa sang cột AQ, e xin rút kinh nghiệm mong a bỏ qua cho e lần này với ạMình nói là bạn cung cấp thông tin thiếu chính xác, mình có nói cung cấp thông tin không đủ đâu kia chứ!?
Nói thêm với bạn rằng chuyện trả lương khoán sản phẩm tập thể loại này trên diễn đàn là hiếm, bạn tự chịu khó tìm đi vậy!