littlejilly
Board Regular
- Joined
- Sep 8, 2011
- Messages
- 168
I am a set of data where I needed to unstack the data so every row of data represents a single person. However, I need to copy a variable so that spans each row. For example, in cell E2, I have '12' and then in E3 and E4, they are blank but I need them to read 12. Same for the next 2000ish rows.
I created a new variable to read whether or not the correspondent cell is blank or not but because this is an odd numbered series, I am having trouble getting the cell reference correct. Every other reference would be a -1 or -2 but I am unsure as to how I would vary this. I tried using it current cells ROW position but again, this is an odd series so the formula only works for every other set of 3.
Any help is greatly appreciated!
I created a new variable to read whether or not the correspondent cell is blank or not but because this is an odd numbered series, I am having trouble getting the cell reference correct. Every other reference would be a -1 or -2 but I am unsure as to how I would vary this. I tried using it current cells ROW position but again, this is an odd series so the formula only works for every other set of 3.
Any help is greatly appreciated!
Code:
=IF(ISBLANK(E2),(OFFSET(E2,-1,,,)),E2)