简体   繁体   中英

Compare rows from 2 worksheets and update a specific column

Please see attached picture.

Workbook 1 is the end product of merging, comparing, formatting, and calculating datasets from a couple of sources. At the beginning of each month, one of the sources gets a staffing update. While this update is running, the 在此处输入图片说明 data represented in Column O will contain 0's. The process takes several hours, but data is updated in this workbook each hour.

What I need to achieve is running a report after the staffing update is completed (represented by Workbook 2) and comparing the data in Workbook 2 to Workbook 1. If ALL data in each row matches between the two workbooks, except for Column O, then Column O needs to get updated from Workbook 2. I should note that the data in the two workbooks will be identical except in column O.

I have looked at other questions/answers on other forums and here in SO, but cannot find anything that matches what I need. If there is an answer out there that matches my requirements, please comment me the link.

Take all the rows except for Row O and put them in a long string, that is (concatenate them in a line) and use an IF THEN statement comparing the differences. If a difference is found between the rows, you can then update them with the value of Column O from Workbook 2.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM