Hello!

I have a Google Spreadsheet. On on sheet, I track how many grams of each food ingredient I eat over days, weeks, months, etc. I.e. 20 g. almonds, 780 g. coffee, 87 g. dark chocolate, etc.

On another sheet, I keep track of a bunch of symptoms I experience throughout the day including brain fog, headaches, etc. using 1 - 10 scales.

What I want to do is create some type of formula that will give a count of a particular food ingredient if it is correlated with a low average weekly score in some symptom.

This isn't the case, but let's say hypothetically I was allergic to peanuts and had a mildly worse headache on the weeks that I ate it. I would want Google Sheets to find that correlation and flag that food as being suspect and give me a count of how many weeks peanuts were associated with a worse than average subjective headache rating.

Hopefully that makes sense, I'm still a newbie when it comes to coding so I could use some help!

Aaron