Guest User

Untitled

a guest
Jan 17th, 2018
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.14 KB | None | 0 0
  1. Private Sub Worksheet_Change(ByVal Target As Range)
  2. If Target.Column = 14 Then 'COLUMN N
  3. If Not IsNumeric(Target.Value) Then
  4. MsgBox "Please enter LBS ran with only numbers.", vbExclamation
  5. Exit Sub
  6. End If
  7. If Len(Target.Value) < 4 And Target.Value <> 0 Then
  8. MsgBox "Please enter LBS ran with comma included.", vbExclamation
  9. Exit Sub
  10. End If
  11. End If
  12.  
  13. If Target.Column = 15 Then 'COLUMN O
  14. If Not IsNumeric(Target.Value) Then
  15. MsgBox "Please enter LBS ran with only numbers.", vbExclamation
  16. Exit Sub
  17. End If
  18. If Len(Target.Value) < 4 And Target.Value <> 0 Then
  19. MsgBox "Please enter LBS ran with comma included.", vbExclamation
  20. Exit Sub
  21. End If
  22. End If
  23.  
  24.  
  25. 'IF COLUMN Q IS MARKED, BUT NOT COMPLETE TEXT TURNS RED
  26. If Target.Column = 18 Then
  27. If Target.Value = "YES" Or Target.Value = "Yes" Or Target.Value = "yes" Then 'Marks text green
  28. With Target.Font
  29. .Color = -16724992
  30. .TintAndShade = 0
  31. End With
  32. Else
  33. With Target.Font
  34. .Color = vbRed
  35. .TintAndShade = 0
  36. End With
  37. End If
  38. End If
  39.  
  40.  
  41. End Sub
Add Comment
Please, Sign In to add comment