I am trying to use the OFFSET function in Excel to pick up data from sheets and put it in the cell. I have this:
=OFFSET('140'!B$48,0,ROWS(Summary!L150))
When i copy down the cell to the below cell using the drag function; the Summary!L150
changes to Summary!L151
which is perfect however I also need it to change the sheet reference from '140' to '141' and keep counting up as i drag. I cannot seem to find away for it to change the sheet number up 1 with each new cell copy.
Eg:
Cell 1:
=OFFSET('140'!B$48,0,ROWS(Summary!L150))
Cell 2:
=OFFSET('141'!B$48,0,ROWS(Summary!L151))
Cell 3:
=OFFSET('142'!B$48,0,ROWS(Summary!L152))
Any advice here would be great as there are literally hundreds of sheets. Thank you in Advance.
I can't see the point of the ROWS function there - you could just put 1 instead. For the sheet name, you need INDIRECT and ROW or ROWS:
=OFFSET(INDIRECT("'"&Row(A140)&"'!B$48"),0,1)
for example.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.