Anda di halaman 1dari 1

'nama fungsi=SELEKSI 'argumen=jabatan, penidikan, umur, IP, dan gender Function seleksi(jabatan, penidikan, umur, IP, gender) 'seleksi

Marketing If jabatan = "Marketing" Then If pendidikan = "D3" And umur < 25 And IP > 2.75 And gender = "Pria" Then seleksi = "LOLOS" Else seleksi = "Tidak Lolos" End If 'seleksi Administrasi ElseIf jabatan = "Administrasi" Then If pendidikan = "S1" And umur < 25 And IP > 2.99 And gender = "Pria" Then seleksi = "LOLOS" Else seleksi = "Tidak Lolos" End If 'seleksi Produksi If jabatan = "Produksi" Then If pendidikan = "D3" And umur < 30 And IP > 2.99 And gender = "Pria" Then seleksi = "LOLOS" Else seleksi = "Tidak Lolos" End If End If End Function

End Function

'kode macro ketika worksheet database aktif Private Sub worksheet_active() 'menyeleksi range a1:g16 Range("a1:g16").Select 'tampilan worksheet sesuai range a1:g16 ActiveWindow.Zoom = True 'menyeleksi range a1 Range("a1").Select End Sub