It might be worth putting in the expected results on your sample file based on the sample raw data... this way people can be sure they are replicating your logic.
My own advice would probably be to adjust your formulae in B on Sheet2 such that you get a clearly delimited list of references (currently as I see it the formula is not returning the correct data in all cases)
You can then "possibly" use a SUMIF approach with wildcard, based on your existing formulae on DATA1 sheet
But as inferred earlier the above is a "guess" as there are no expected results so it's more than likely the above is missing some key logic requirement.
Bookmarks