PDA

View Full Version : VBA for consolidating data without duplicates



Dadashvespek
02-03-2020, 06:16 PM
I have a sheet of recipes that contain ingredients and ingredients repeat for each recipe. After consolidating the data into another sheet, it combines duplicates and updates if I update numbers in source which is good. But if I want to add/remove a recipe which occurs very frequently, I would need to re-consolidate the whole table again or else I'll get a #Ref error in the ingredient I deleted. And an added ingredient doesn't add to the consolidated list. So I think the solution would be to create a vba that automatically consolidates everything into the summary sheet. I have searched multiple forums and many tutorial videos as my knowledge is very limited in vba. And the only success I've had is a code that consolidated the data but did not combine duplicates. I have attached the file I used but for simplicity I cut about 90% of the actual list. Any help regarding this is appreciated, maybe there is an alternative solution that doesnt require vba, I read something about the use of aggregate instead of sum, but couldnt figure that out.25917