Add G,H,I required check in validateDetailData

This commit is contained in:
updsv7
2026-04-13 15:52:59 +09:00
parent 40a4e62f3f
commit d71ac70677

View File

@@ -295,6 +295,22 @@ Sub validateDetailData(ByVal ws As Worksheet, ByVal rowNum As Long)
Exit Sub
End If
' Check G, H, I required and numeric
If Trim(ws.Cells(rowNum, 7).Value) = "" Or Not IsNumeric(ws.Cells(rowNum, 7).Value) Then
ws.Cells(rowNum, 17).Value = "G column is required and must be numeric"
Exit Sub
End If
If Trim(ws.Cells(rowNum, 8).Value) = "" Or Not IsNumeric(ws.Cells(rowNum, 8).Value) Then
ws.Cells(rowNum, 17).Value = "H column is required and must be numeric"
Exit Sub
End If
If Trim(ws.Cells(rowNum, 9).Value) = "" Or Not IsNumeric(ws.Cells(rowNum, 9).Value) Then
ws.Cells(rowNum, 17).Value = "I column is required and must be numeric"
Exit Sub
End If
' Check L-P optional but must be numeric if entered
Dim col As Long
Dim colName As String