I'm trying to ensure that a journal entry template is being filled out all the way with all required fields. In column E of my template the user enters the GL account. If GL account starts with the number 4 or 5, then user has to enter a functional area in Column H respectively. Ideally i want to have the process loop around until the user enters functional area in column H if there's a GL account present that starts with 4 or 5.
If Left(Range("E34"), 1) = 5 Or Left(Range("E35"), 1) = 5 Or Left(Range("E36"), 1) = 5 Or Left(Range("E37"), 1) = 5 _
Or Left(Range("E34"), 1) = 4 Or Left(Range("E35"), 1) = 4 Or Left(Range("E36"), 1) = 4 Or Left(Range("E37"), 1) = 4 Then
ElseIf IsEmpty(Range("H34")) = True Or IsEmpty(Range("H35")) = True Or IsEmpty(Range("H36")) = True Or IsEmpty(Range("H37")) = True Then
MsgBox "You entered a GL starting with 4 or 5 but forgot to enter a FA. Please check column H and enter appropriate FA.", vbExclamation
Cancel = True
Else
Aucun commentaire:
Enregistrer un commentaire