VBA to lookup,Match and update the values from another sheet

aaleem

Board Regular
Joined
Sep 26, 2014
Messages
56
Office Version
  1. 2016
Hi,
I have a file that contains 100K+ records for various logs. Currently, it is taking a long time to validate each user and update the Status, Job Description, and responsibility.
I have given the below sample of two sheets along with the expected results.

is there a possibility to automate this thru VBA?

Any help will be highly appreciated.

Sheet 1 (Result Sheet) where the update is required.
Index Match VBA based on condition.xlsx
ABCDEFGHIJ
1Supplier NameQuantity Total Unit Cost Comb.StatusUsernameUser job descDeptResponsible
2SAJU Trading LLC428382.042Pending QATom
3SAJU Trading LLC6228462.473DSD LogTom
4Allex Enterprises LLC1236.061Pending matchFred
5SAJU Trading LLC132225.781Pending QA-DSDGlasgo
6SAJU Trading LLC389791.811Pending QA-DSDGlasgo
7SAJU Trading LLC437869.609Pending QAFred
8SAJU Trading LLC428382.042DSD LogMike
9Trading LLC428382.042Pending matchMike
10Trading LLC428382.042NO GRNTom
11Trading LLC428382.042GRN ApprovedTom
12
13
14VBA Conditions
15For each user in Col. F (Username) If User name match from Status sheet, If not match ignore the row
16Then Compare the Comb. Status with Status Sheet Col E (Status to be)
17Update the Comb. Status (Col D in Result sheet) by copying the (Status to be) from Status Sheet
18Also to update the User Job desc, Dept and Responsible column by copying from the Status sheet for respetive users.
19(Excel Version 2016)
20Below is the expected result
21
22Supplier NameQuantity Total Unit Cost Comb.StatusUsernameUser job descDeptResponsible
23SAJU Trading LLC428382.042Pending with LogisticsTomLogistics ManagerLogisticsHarry
24SAJU Trading LLC6228462.473Pending with LogisticsTomLogistics ManagerLogisticsHarry
25Allex Enterprises LLC1236.061Pending with Logistics- No GRNFredLogistic ExecutiveLogisticsHarry
26SAJU Trading LLC132225.781Pending with BuyingGlasgoPlannerBuyingTim
27SAJU Trading LLC389791.811Pending with BuyingGlasgoPlannerBuyingTim
28SAJU Trading LLC437869.609Pending with Logistics- No GRNFredLogistic ExecutiveLogisticsHarry
29SAJU Trading LLC428382.042DSD LogMike
30Trading LLC428382.042Pending matchMike
31Trading LLC428382.042Pending with LogisticsTomLogistics ManagerLogisticsHarry
32Trading LLC428382.042Pending with LogisticsTomLogistics ManagerLogisticsHarry
Result


Status sheet (to lookup the values)

Index Match VBA based on condition.xlsx
ABCDE
1UsernameUser job descDeptResponsibleStatus to be
2TomLogistics ManagerLogisticsHarryPending with Logistics
3FredLogistic ExecutiveLogisticsHarryPending with Logistics- No GRN
4GlasgoPlannerBuyingTimPending with Buying
5
6
7
8
9
10
11
Status



Thanks
aleem
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.

Forum statistics

Threads
1,223,275
Messages
6,171,126
Members
452,381
Latest member
Nova88

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top