Troubling using cell references

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!

Code:
=IF(ISBLANK(E2),(OFFSET(E2,-1,,,)),E2)
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).

Forum statistics

Threads
1,223,903
Messages
6,175,289
Members
452,631
Latest member
a_potato

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top