vendredi 6 avril 2018

IF statement with multiple values

Branch Table

branchID

BRANCH01
BRANCH02
BRANCH03
BRANCH04

Employee Table

employeeID

EMPLOYEE01 -- BRANCH01
EMPLOYEE02 -- BRANCH01
EMPLOYEE03 -- BRANCH02
EMPLOYEE04 -- BRANCH02
EMPLOYEE05 -- BRANCH03
EMPLOYEE06 -- BRANCH03
EMPLOYEE07 -- BRANCH04
EMPLOYEE08 -- BRANCH05

how do I make it like IF employee01 it will show BRANCH01 , same goes to the others.

as I have around 400 data , does not want to key in 1by1

Tried code (not working)

=IF(D3="BRACH01","EMPLOYEE01")*OR(D3="BRACH01","EMPLOYEE02")

Things that I want to archived(see below). But due to my data consist of over 400 data and i can't insert myself as it would take alot of time

branchID    employeeID
BRANCH01    EMPLOYEE01 
BRANCH02    EMPLOYEE03 
BRANCH03    EMPLOYEE05 
BRANCH04    EMPLOYEE07 
BRANCH01    EMPLOYEE02
BRANCH02    EMPLOYEE04
BRANCH03    EMPLOYEE06
BRANCH04    EMPLOYEE08
BRANCH01    EMPLOYEE02
BRANCH02    EMPLOYEE03 
BRANCH03    EMPLOYEE05 
BRANCH04    EMPLOYEE08

Aucun commentaire:

Enregistrer un commentaire