Hi, I'm trying to implement a lead/lag sort of function in Excel. I've attached a sample file.
If there is a value in column C (text), I want to pull x rows forward in Column E (pupil size) and average across the values in those rows until the next value in Column C (text) appears. For example, if there is a value in column C like 'PICSTIM_ 0', I want to average the values in Column E (and output the average) until the next value in column C appears like 'PICSTIM_ 1'. Is there a way to implement this programatically in Excel? Right now I've been doing it manually and it's a pain/takes awhile.
If I can clarify or provide further information let me know. Thanks for your help in advance!