B
Bhuktar S
Please help !
I have 34 users & I need to assign for each user a separate no. in cel
A2. The format of the number need to be with 2 letters assigned t
individual & leading with 0 (zero) if the number is below 100 (e.g., i
cell A2 is entered with 22, its value to be ar022 & not ar22) else wit
the no.(say, ar122).
Secondly, the writing of code will be very big if I have to write fo
34 cases. How do I make it simple?
Select Case Application.UserName
Case "X1"
If Range("A2").Value < 100 Then
Range("A2").NumberFormat = """ar0""0"
Else: Range("A2").NumberFormat="""ar""0"
End If
Case "X2"
If Range("A2").Value < 100 Then
Range("A2").NumberFormat = """br0""0"
Else: Range("A2").NumberFormat="""br""0"
End If
Case "X3"
If Range("A2").Value < 100 Then
Range("A2").NumberFormat = """cr0""0"
Else: Range("A2").NumberFormat="""cr""0"
End If
Case n....
End Selec
I have 34 users & I need to assign for each user a separate no. in cel
A2. The format of the number need to be with 2 letters assigned t
individual & leading with 0 (zero) if the number is below 100 (e.g., i
cell A2 is entered with 22, its value to be ar022 & not ar22) else wit
the no.(say, ar122).
Secondly, the writing of code will be very big if I have to write fo
34 cases. How do I make it simple?
Select Case Application.UserName
Case "X1"
If Range("A2").Value < 100 Then
Range("A2").NumberFormat = """ar0""0"
Else: Range("A2").NumberFormat="""ar""0"
End If
Case "X2"
If Range("A2").Value < 100 Then
Range("A2").NumberFormat = """br0""0"
Else: Range("A2").NumberFormat="""br""0"
End If
Case "X3"
If Range("A2").Value < 100 Then
Range("A2").NumberFormat = """cr0""0"
Else: Range("A2").NumberFormat="""cr""0"
End If
Case n....
End Selec