Lookup between 2 tables and match the field and update the records

manshah

New Member
Joined
Jun 4, 2019
Messages
9
Hi

I have 2 tables as shown below. I want to look up the "Field" column in Table 2 and and update the record in Table 1 for the column mentioned in "Field column of Table 2 based on most current "System Notes Date".
For Example: In Table 1, for document number OPP1003, "Exp.Close Date" should be updated to reflect 10/1/2019. Please see the table "Result" which shows the final output.

TABLE 1:
Document NumberDepartmentBooking DateSales RepExp. Close DateOpportunity StatusProjected TotalProbabilityWeighted TotalProject Start DateProject End Date
OPP1003NE1/23/2019MD7/1/2019SP 14,500.000.4 5,800.009/6/201912/31/2019
OPP1041SMB5/20/2019Marci Cap7/1/2019DNO87000.217407/24/20197/24/2019

<colgroup><col><col><col><col><col><col><col><col span="4"></colgroup><tbody>
</tbody>

<colgroup><col><col><col><col><col><col><col><col span="4"><col></colgroup><tbody>
</tbody>


TABLE 2:
Document NumberDate CreatedSystem Notes DateProjected Total FieldOld ValueNew Value
OPP10039/11/2018 10:357/24/2019 12:0314500Exp. Close Date7/26/20198/30/2019
OPP10039/11/2018 10:357/24/2019 12:0314500Project Start Date9/6/20199/20/2019
OPP10039/11/2018 10:357/30/2019 15:4314500Exp. Close Date8/30/201910/1/2019
OPP10039/11/2018 10:357/30/2019 15:4314500Project Start Date9/20/201910/31/2019
OPP10419/11/2018 19:537/18/2019 9:048700Exp. Close Date7/24/20198/6/2019
OPP10419/11/2018 19:537/18/2019 9:048700Project End Date7/24/20198/6/2019
OPP10419/11/2018 19:537/18/2019 9:048700Project Start Date7/24/20198/6/2019
OPP10419/11/2018 19:537/18/2019 9:058700Probability2050
OPP10419/11/2018 19:537/18/2019 9:058700Projected Total8700.005220.00

<colgroup><col><col><col><col><col><col><col></colgroup><tbody>
</tbody>

RESULT:
Document NumberDepartmentBooking DateSales RepExp. Close DateOpportunity StatusProjected TotalProbabilityWeighted TotalProject Start DateProject End Date
OPX1003NE1/23/2019MD10/1/2019SP 14,500.000.4 5,800.0010/31/201912/31/2019
OPX1041SMB5/20/2019Marci Cap8/6/2019DNO52200.526108/6/20198/6/2019

<colgroup><col><col><col><col><col><col><col><col><col><col><col></colgroup><tbody>
</tbody>


I have thousands of records of similar data and looking for formula or code to automate the process.

Any help is greatly appreciated. Thank you!
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.

Forum statistics

Threads
1,214,944
Messages
6,122,387
Members
449,080
Latest member
Armadillos

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