Public Function GetIt(Code As String) Dim X As String Dim Y As String X = Code If X = "429" Or X = "22" Or X = "21" Or X = "20" Or X = "19" Or X = "18" Or X = "17" Or X = "435" Or X = "431" Then Y = "22" If X = "1" Or X = "2" Or X = "3" Or X = "4" Or X = "5" Then Y = "23" If X = "79" Or X = "80" Or X = "81" Or X = "449" Or X = "451" Then Y = "24" If X = "74" Or X = "75" Or X = "132" Or X = "133" Or X = "134" Or X = "136" Or X = "138" Or X = "140" Or X = "68" Or X = "69" Or X = "70" Or X = "71" Or X = "72" Or X = "73" Then Y = "25" If X = "76" Or X = "77" Or X = "78" Or X = "443" Or X = "445" Then Y = "26" If X = "89" Or X = "90" Or X = "97" Or X = "98" Then Y = "9" If X = "82" Or X = "83" Or X = "222" Or X = "224" Then Y = "13" If X = "93" Or X = "94" Or X = "95" Then Y = "16" If X = "85" Or X = "86" Or X = "87" Or X = "562" Or X = "576" Or X = "577" Or X = "578" Then Y = "18" If X = "706" Or X = "718" Or X = "719" Or X = "720" Or X = "721" Or X = "722" Or X = "723" Or X = "724" Then Y = "42" GetIt = Y End Function

I am just confused . I am new in vb6

This post has been edited by **JackOfAllTrades**: 08 June 2013 - 03:27 AM

Reason for edit:: Added code tags