First View (FIRST SHEET FOR UPLOADING)
Second View (DATABASE WHERE DATA IS PARSED AND MANUAL EDITION IS BLOCKED
SUB I MADE FOR DATA VALIDATION AND PARSING INFO
嗨其他开发者, 这是我第一次使用VBA。我陷入了困境,因为我需要添加一些我无法弄清楚的功能。我需要修改我的sub,所以如果在“UPLOAD”幻灯片上有任何重复的行,它将不再粘贴在我的“BASE”中,如果有相同的行但是QTY被修改它应该更新到新的QTY。你能帮我弄清楚如何改变我的潜艇吗?
Tks and respect。
编辑:
这是SUB:
Sub Button_Click()
ThisWorkbook.Worksheets("UPLOAD").Range("C4", Cells(Rows.Count, 3).End(xlUp)).Interior.ColorIndex = xlNone
For Each c In Worksheets("UPLOAD").Range("C4", Cells(Rows.Count, 3).End(xlUp))
If (Len(c) <> 12) And (c <> "") Then
c.Interior.ColorIndex = 3
MsgBox ("Faltan 12ncs!! Porfavor agreguelos o corrija los que estén mal.")
Exit Sub
End If
Next c
a = Worksheets("UPLOAD").Cells(Rows.Count, 1).End(xlUp).Row
For i = 4 To a
Worksheets("UPLOAD").Rows(i).Copy
Worksheets("BASE").Activate
b = Worksheets("BASE").Cells(Rows.Count, 1).End(xlUp).Row
Worksheets("BASE").Cells(b + 1, 1).Select
ActiveSheet.Paste
Worksheets("UPLOAD").Activate
Next
Application.CutCopyMode = False
Worksheets("UPLOAD").Cells(1, 1).Select
End Sub
答案 0 :(得分:-1)