mercredi 20 septembre 2017

Excel-If case copy paste from another sheet

I have a workbook which has 2 sheets.(Roles and roleUpdates). Role update sheet contains the role changes and new roles. It has more entry than the Roles sheet but I only want to deal with the entries that is both in the Roles and RoleUpdates. One of the colums in the RoleUpdates is called "status" and it one of the options is roleChange. Roles sheet is the one that I want to update which has the older roles. Basically I want to look at the status column in the RoleUpdates and if it is "roleChange", then I want to copy that role column in the RoleUpdates sheet and paste it into Roles sheet based on the name. Example;

roleUpdates

COL A       COL B     COL C 
ROLES       NAMES     STATUS   
Teller      David     roleChange   
Customer    Tom       noChange 
Admin      Liam      roleChange
-------------


    Before Running Script 
Roles (I want this one to be updated)
    ------------- 
COL A       COL B 
ROLES       NAMES 
Customer    Liam 
Admin       David  
Teller      Tom
    -------------


After Running Script 
Roles
    ------------- 
COL A       COL B 
ROLES       NAMES 
Admin       Liam 
Teller      David  
Customer    Tom
    -------------

I hope this was clear enough. Thanks in advance.

Aucun commentaire:

Enregistrer un commentaire