Forum Discussion
Excel Code trying to copy cell data from one sheet to another based on 2 criteria
This is excellent and almost works.
It runs, it identifies / matches the Unique ID correctly, and updates the table, however it updates with nothing, i.e. the values of baselineDate and percentComplete seem to be empty.
Any ideas ?
if possible,upload a sample workbook with source data and expected result.
- PaulD0925Sep 12, 2025Copper Contributor
https://1drv.ms/x/c/b4b3b07c497b44a7/EU5FkhWZ6EJDvsmCQc7m9CEB7fJ16m5q72-5eWM-QZWVUw?e=2QcLeP
I'm hoping this works - I can't see how to upload the test file hence it's on my onedrive but anyone with the link should be able to edit.
- peiyezhuSep 13, 2025Bronze Contributor
If planID = r.Range(1, tbl.ListColumns("Plan Unique ID").Index).Value Then
sheet "Tracker" field "Plan Unique ID"
Or MPP Unique ID?
- PaulD0925Sep 25, 2025Copper Contributor
Hi - Sorry for the delay - I was away.
I fixed the error however these 2 rows seem to be the problem. The values remain empty, hence when the update happens it fills with nothing.
baselineDate = wsPlan.Cells(i, "I").Value
percentComplete = wsPlan.Cells(i, "L").Value