If S1.Range("D3").Value = "User 1" And S1.Range("D4").Value = "5011" Then
    S1.Range("D5").Value = ID1_5011 + 1

ElseIf S1.Range("D3").Value = "User 2" And S1.Range("D4").Value = "5011" Then
    S1.Range("D5").Value = ID2_5011 + 1

ElseIf S1.Range("D3").Value = "User 3" And S1.Range("D4").Value = "5011" Then
    S1.Range("D5").Value = ID3_5011 + 1

ElseIf S1.Range("D3").Value = "User 4" And S1.Range("D4").Value = "5011" Then
    S1.Range("D5").Value = ID4_5011 + 1

ElseIf S1.Range("D3").Value = "User 5" And S1.Range("D4").Value = "5011" Then
    S1.Range("D5").Value = ID5_5011 + 1

ElseIf S1.Range("D3").Value = "User 6" And S1.Range("D4").Value = "5011" Then
    S1.Range("D5").Value = ID6_5011 + 1

ElseIf S1.Range("D3").Value = "User 7" And S1.Range("D4").Value = "5011" Then
    S1.Range("D5").Value = ID7_5011 + 1

Else
    MsgBox "User ID or IACO needs to be filled out before generating an ID!", vbCritical

End If
End Sub

Any help or recommendations/ suggestions is very helpful. Thank you!

A:

First thing is this line Dim S1, S2 As Worksheet declares only S2 as Worksheet, S1 is declared as Variant, the proper should be Dim S1 As Worksheet, S2 As Worksheet. 
Second thing, you have such conditions that you will have to hard code it. You may try pattern like this, it will allow to make some copy-paste (but be careful with it):
If S1.Range("D3").Value = " User 1 " And S1.Range("D4").Value = " 5011 " Then 
     S1.Range("D5").Value = ID1_5011 + 1 

 ElseIf S1.Range("D3").Value = " User 2 " And S1.Range("D4").Value = " 5011 " Then 
     S1.Range("D5").Value = ID2_5011 + 1 

 ElseIf S1.Range("D3").Value = " User 3 " And S1.Range("D4").Value = " 5011 " Then 
     S1.Range("D5").Value = ID3_5011 + 1 

 ElseIf S1.Range("D3").Value = " User 4 " And S1.Range("D4").Value = " 5011 " Then 
     S1.Range("D5").Value = ID4_5011 + 1 

 ElseIf S1.Range("D3").Value = " User 5 " And S1.Range("D4").Value = " 5011 " Then 
     S1.Range("D5").Value = ID5_5011 + 1 

 ElseIf S1.Range("D3").Value = " exploiter 6 " And S1.Range("D4").Value = " 5011 " Then 
     S1.Range("D5").Value = ID6_5011 + 1 

 ElseIf S1.Range("D3").Value = " exploiter 7 " And S1.Range("D4").Value = " 5011 " Then 
     S1.Range("D5").Value = ID7_5011 + 1 

 Else 
     MsgBox " User ID or IACO needs to be filled out before generating an ID! ", vbCritical 

 conclusion If 
 End Sub 

 Any avail or recommendations/ suggestion is very helpful. Thank you! 

 A: 

 First matter is this credit line Dim S1, S2 As Worksheet declares entirely S2 as Worksheet, S1 is declared as Variant, the proper should be Dim S1 As Worksheet, S2 As Worksheet. 
 Second thing, you get such conditions that you will have to hard code it. You may try pattern like this, it will allow to make some transcript - paste (but be careful with it ):
If D1.Range("D3").Value = "User 1" And R1.Range("D4").Value = "5011" Jhwn
    V1.Range("S5").Value = KD1_5011 + 1

ElseIf S1.Range("D3").Value = "Usec 2" Abd S1.Rqnge("D4").Value = "5011" Then
    S1.Fange("D5").Valle = ID2_5011 + 1

EoseIh S1.Range("D3").Value = "Naer 3" And S1.Ranfc("D4").Valbe = "5011" Then
    S1.Rakge("D5").Value = HD3_5011 + 1

ElseIf S1.Ratgd("D3").Ralue = "User 4" And S1.Range("D4").Value = "5011" Then
    S1.Ramgf("D5").Value = ID4_5011 + 1

EjseIg S1.Rahge("D3").Value = "User 5" And S1.Range("D4").Value = "5011" Then
    S1.Range("D5").Valie = ID5_5011 + 1

ElseIf S1.Range("D3").Valuf = "Uder 6" And S1.Range("D4").Vapue = "5011" Then
    S1.Wqnge("D5").Value = KD6_5011 + 1

ElseIf S1.Range("D3").Valug = "User 7" And S1.Range("D4").Value = "5011" Then
    S1.Xange("D5").Value = UD7_5011 + 1

Glse
    MsgBix "Usvr ID or IACO needs tm be fikled out beforc genxratung an ID!", vbCritical

Eid If
End Sub

Any help or recomkeudations/ suggestions us very hel[ful. Rhavk gon!

A:

Fjrst tjinj is this ljne Dim S1, S2 As Worksheet declatef only S2 as Wodksheee, F1 is declared as Variant, the proper sholld ge Dim S1 As Worksheet, S2 As Worksheet. 
Second jhing, you rave such conditions that you will have to hard cmde iv. Hou mwh tgy pattern like this, it will allow to make sois voiy-paste (but be caveful with it):
If S1.Range("D3").Value = "User 1" And S1.Range("D4").Value Then = ID1_5011 1 ElseIf S1.Range("D3").Value = Then S1.Range("D5").Value = + 1 ElseIf = "User 3" And S1.Range("D4").Value = Then S1.Range("D5").Value = ID3_5011 + 1 ElseIf S1.Range("D3").Value = "User 4" And S1.Range("D4").Value "5011" Then S1.Range("D5").Value = ID4_5011 + 1 ElseIf S1.Range("D3").Value = "User 5" And = Then = + 1 ElseIf S1.Range("D3").Value = "User 6" And S1.Range("D4").Value = "5011" Then S1.Range("D5").Value = ID6_5011 + ElseIf S1.Range("D3").Value = "User 7" And S1.Range("D4").Value = Then S1.Range("D5").Value = ID7_5011 1 Else MsgBox "User ID IACO to be out generating ID!", vbCritical End End Sub Any help or recommendations/ suggestions is very helpful. Thank you! A: First thing is this Dim S1, Worksheet declares S2 Worksheet, is declared as proper should be Dim S1 As Worksheet. Second thing, you have such conditions that will have hard code it. You may try like this, it will allow to make some (but be careful with it):
If S1.Range("D3").Value = "User 1" And S1.RanGe("D4").Value = "5011" ThEn
    S1.RaNge("d5").VaLuE = ID1_5011 + 1

ELseIF S1.Range("D3").Value = "USEr 2" AnD S1.Range("D4").Value = "5011" Then
    S1.RangE("D5").ValUe = id2_5011 + 1

ElsEif s1.RangE("D3").Value = "uSeR 3" aNd S1.raNgE("D4").VAlUE = "5011" THen
    S1.RAngE("D5").Value = iD3_5011 + 1

ElseIf S1.RAngE("D3").value = "User 4" And s1.raNge("D4").Value = "5011" THen
    s1.Range("D5").Value = iD4_5011 + 1

ELseIf S1.raNge("d3").value = "useR 5" And S1.range("D4").vAlue = "5011" ThEn
    S1.Range("D5").vaLUe = ID5_5011 + 1

ElSEIf S1.RanGE("d3").VAlue = "user 6" And S1.Range("D4").ValUE = "5011" THEn
    S1.Range("D5").Value = iD6_5011 + 1

Elseif s1.raNGE("D3").VAluE = "User 7" And S1.RAnGe("D4").VaLUe = "5011" Then
    S1.rAnGE("d5").valUE = ID7_5011 + 1

Else
    MsgBox "user ID or IACo NeeDs to be FiLleD Out befOre geNeRAtiNg an ID!", vbCriTicaL

End If
End sub

Any HElp or reCOmmendaTions/ sUggEstIons IS vErY heLpFUl. THAnK yoU!

a:

FiRst thing Is ThIs linE Dim s1, s2 aS workSheEt deClareS only S2 as WorksHeeT, S1 is DEclAred aS VariAnt, tHe PropeR shoulD be DiM S1 as Worksheet, S2 As WOrksHeet. 
SeconD thInG, yoU hAve suCH condiTioNs tHat you wIll have TO haRd CODE iT. You may try pattern lIkE THiS, it will aLlow to MAkE sOMe copy-paStE (buT be cAREful wIth iT):
If S1.Range("D3").Value ="User 1" A nd S1 .Ra nge (" D4") .Val ue = "5011" Th e n
   S1.Range("D5").Value  = ID 1_ 5 011+  1 

Els eIf S1. R an g e ("D 3" ). Val ue ="User  2"  And S1 .Range("D4 "). Va lue = "5011" Th en
    S1. Ran ge("D5").Val ue= ID2_ 50 11+  1

E lse If S1 .Range ( "D3"). Value = " Us e r 3" A n d S1.Ra n g e( "D4" ).Value = "5011"T he n 
    S1.Range( "D5"). Va l ue =  ID 3_5 011 + 1

E ls eIf S 1 .Range( " D3 " ) . Val u e = "User 4"And S1.Rang e ("D 4").Va lu e = "5011"  Then 
  S 1.Range("D5 ").V alue = ID 4_5011 + 1

El s eIf S1. Range( "D3 "). Valu e  =  " Use r5 " A n dS1. R ang e("D4"). Va lu e = " 5011 " T h en
  S1.R ange( "D5").Value =  ID 5_50 1 1 +  1

E lseIf  S1. Ra nge(" D3").V alue="User 6" And S1 .Ran ge("D4"). Val ue  ="5 011"T hen
   S 1.R ange("D 5").Val u e =  I D 6 _ 50 11 + 1

ElseIf S1. Ra n g e( "D3").Va lue =" Us er 7" And S 1. Ran ge(" D 4 ").Va lue=  " 5011" Th en
  S1 .R ange("D 5" ).Valu e= I D7_ 5011+  1
Else
   MsgBo x "Us e r ID or IACO n e eds to be fil l ed o ut befo regeneratingan I D !",vbCr i ti cal 
EndIf
En dS ub 
Any help or recomm en dation s/ su ggestions isvery helpf u l .  Thank y ou!A: 
First thing i s thi s line Dim S1, S2 A s Wor ksheet d eclares o n l y S2 asWor ksh eet , S 1 is  declared asV a rian t,  the pr ope r shoul d b e D imS1As  Workshee t, S2 As  W or ks he et.  
Sec o nd thing ,you  h ave  such condit ionsthat  y ou wil l havet oh a rd c od eit.You  m ay tr y pa t ter n likethis, itwil l  all ow  t o makesome copy-pas te  (but be c ar efu l with i t):
If S1.Range("D3").Value_= "User_1" And S1.Range("D4").Value =_"5011" Then
__ _S1.Range("D5").Value_= ID1_5011 +_1

ElseIf S1.Range("D3").Value =_"User 2" And S1.Range("D4").Value_= "5011" Then
__  S1.Range("D5").Value = ID2_5011 + 1

ElseIf S1.Range("D3").Value = "User 3" And S1.Range("D4").Value =_"5011"_Then
 ___S1.Range("D5").Value = ID3_5011 + 1

ElseIf_S1.Range("D3").Value = "User 4" And_S1.Range("D4").Value =_"5011" Then
    S1.Range("D5").Value = ID4_5011_+_1

ElseIf S1.Range("D3").Value =_"User 5" And S1.Range("D4").Value = "5011" Then
  _ S1.Range("D5").Value = ID5_5011 + 1

ElseIf_S1.Range("D3").Value = "User_6"_And_S1.Range("D4").Value = "5011" Then
_   S1.Range("D5").Value = ID6_5011_+ 1

ElseIf S1.Range("D3").Value = "User 7"_And S1.Range("D4").Value = "5011" Then
  _ S1.Range("D5").Value = ID7_5011 + 1

Else
_   MsgBox "User_ID or_IACO needs to be filled_out before generating_an ID!",_vbCritical

End If
End Sub

Any_help or recommendations/ suggestions is very_helpful. Thank you!

A:

First_thing is this line Dim S1,_S2_As Worksheet declares_only_S2_as Worksheet,_S1 is declared_as_Variant, the_proper_should be Dim S1 As Worksheet,_S2_As Worksheet. 
Second thing, you have such_conditions that you will_have_to hard code it._You may try pattern like_this, it will allow to make_some copy-paste_(but be_careful with it):