Forum Discussion
Transfer and changing data with two different Excel sheets
- Aug 29, 2021
scaffnull Combined both sheets into one to make it easier to follow through the entire process. The attached file contains a "dirty" PQ solution that need optimizing. Bur just to be sure that the Invoice table is something you had in mind. Perhaps it enables you to continue with what you developed earlier. If not, come back here.
Thank you for your reply.
scaffnull You could just create one file/table (cut and paste) with all weekly hours per job number and then summarize the lot with a pivot table. Or, if you want to avoid the manual copying and pasting, look into PowerQuery (PQ). Set up the correct routine(s) once and just add weekly data files to a particular folder on your system and refresh the query(ies). It is as easy as it sounds, BUT you need to learn some PQ basics first.
But, to be sure that these are indeed the smartest ways, please upload some sample data. Replace any confidential information with something that is made up.
- scaffnullAug 29, 2021Brass Contributor
Riny_van_Eekelen Been trying this out for a week now with any success. Both trying to learn PowerQuery and testing it in Power BI. But I attached two files.
So to explain, I get Sheet1 with updated data every week, and Sheet2 is where I want to add/transfer/delete the data based on Sheet1. So, for the second row in Sheet1 the "WorkNr" matches a "WorkNr" in Sheet2, then I want to add the Hours Worked on to Sheet2, since the "WorkNr" matched. And that goes for row 5,8,11(from Sheet1) as well since the "WorkNr" match. But for row 14 there is a new WorkNr that doesn't match any WorkNr in Sheet2. I then want to add the new WorkNr on to Sheet2, with WorkNr, Hours Worked, Company, Place (the formatting I get from Sheet1 is not ideal, but I found a way in Power Query to extract that into a new column for Company, and Place). Then for row 14, and 23 (in Sheet1) they have matches with WorkNr,(twice job on that in one week) so all I want to do there is to add the total Work Hours to Sheet2. So in the end, if WorkNr match, only add hours, if WorkNr do not match, add a new row in Sheet2 with all the criteria. So when automated, total work hours with matching WorkNr adds up to the total hours from Sheet1 (this case 272).Hope this makes some sense since I'm fairly new to the PowerQuery, PowerBI and Excel world.
Thanks!
- Riny_van_EekelenAug 29, 2021Platinum Contributor
scaffnull Combined both sheets into one to make it easier to follow through the entire process. The attached file contains a "dirty" PQ solution that need optimizing. Bur just to be sure that the Invoice table is something you had in mind. Perhaps it enables you to continue with what you developed earlier. If not, come back here.
- Desmania_Design2365Mar 05, 2024Copper Contributor
what data transfer one sheet to another url sheet using office script?