Change duplicate check to GH only

This commit is contained in:
updsv7
2026-04-13 16:06:04 +09:00
parent 9343709420
commit 9aefa61754

View File

@@ -332,16 +332,14 @@ Sub validateDetailData(ByVal ws As Worksheet, ByVal rowNum As Long)
g = Trim(ws.Cells(rowNum, 7).Value) g = Trim(ws.Cells(rowNum, 7).Value)
h = Trim(ws.Cells(rowNum, 8).Value) h = Trim(ws.Cells(rowNum, 8).Value)
i = Trim(ws.Cells(rowNum, 9).Value)
lastRow = ws.Cells(ws.Rows.Count, "C").End(xlUp).Row lastRow = ws.Cells(ws.Rows.Count, "C").End(xlUp).Row
For r = 7 To lastRow For r = 7 To lastRow
If r <> rowNum And Trim(ws.Cells(r, 3).Value) = Trim(ws.Cells(rowNum, 3).Value) Then If r <> rowNum And Trim(ws.Cells(r, 3).Value) = Trim(ws.Cells(rowNum, 3).Value) Then
If Trim(ws.Cells(r, 7).Value) = g And _ If Trim(ws.Cells(r, 7).Value) = g And _
Trim(ws.Cells(r, 8).Value) = h And _ Trim(ws.Cells(r, 8).Value) = h Then
Trim(ws.Cells(r, 9).Value) = i Then ws.Cells(rowNum, 17).Value = "GH combination already exists"
ws.Cells(rowNum, 17).Value = "GHI combination already exists"
Exit Sub Exit Sub
End If End If
End If End If