Hi! I have a large spreadsheet (with about 80000 rows), and each row is one of 2 categories: "Stimulus" or "Blank". These appears as series of about 20-70 "Stimulus" or "Blank" rows in a row, alternating between "Stimulus" and "Blank" series (the length of this series varies throughout the spreadsheet). For reference, 1 "Stimulus" series + 1 "Blank" series of rows = 1 trial. What I'm trying to do is create a function for column that keeps track of the row # within each trial object (i.e. a counter that resets at each "change" from "Stimulus" to "Blank" and vice versa.). E.g. :
A B
Stimulus 1
Stimulus 2
Stimulus 3
Stimulus 4
Blank 1
Blank 2
Blank 3
Blank 4
Blank 5
Blank 6
Stimulus 1
Stimulus 2
Stimulus 3
Blank 1
Blank 2
Blank 3
Blank 4
...
So a sketch of the solution would be this function: =IF(A1=A2, B1 + 1, 1).
However, the issue with my raw data is that the above data is printed out in every other row (i.e. each row is "double spaced"), and because the file is so large, and I have to do this for multiple files, I've found that filtering out/deleting the empty rows would take far too long to process and require a fair amount of manual labor. How can I adjust this function so that it will do the same "counting" function, but for data printed out in every other row within the spread sheet?
Bookmarks