I'm trying to find the average velocity of particles. The program gives instantaneous velocities for the particles but not the average. I'm left with an excel file with thousands of instant velocities for dozens of particles. There are varying amounts of values per particle, some have maybe 7 values, others might have 30.

I can manually select which values to average, but I'd like to know if I could have excel do that automatically.

For instance, in collum B I'd have the values I want to get averages from, in A I have which category they belong to. Rows 1-7 might be particle A, rows 8-20 might be particle B.

Is there a way for excel to get the averages in B (velocity) for each category (particle) in A?