I want to fill the previous 48 rows with the value of row i. I've got a dataset that is a continuous timeseries with a row for every 5 min increment of time. I have an identification column for select periods (e.g. ID#1, 2, 3, ... 1000). Not every row gets an identifier, just select periods of time. Now say row 1200 is the first value of ID # 250. I want the previous 48 rows (so rows 1152-1199), currently emply, to also be filled in with the value "250". Anyone know a formula that will do this? I was thinking of some sort of index but not sure how do do it. There is a very clunky way of scripting this that I am trying to avoid... basically just an insanely long formula of If-Then statements but to do that 48 times is a bit silly. I'm looking for some way of using a simple formula .. Row i - Lag-row,48, fill with ID from row i.
Hope that makes sense, let me know if you need more info or clarification