Return offset array

mrblister

Board Regular
Joined
Nov 20, 2016
Messages
191
Office Version
  1. 2019
Platform
  1. Windows
I have a formula:

"OFFSET(INDIRECT($B$3),2,0)" array entered

B3 contains a range e.g. "c8:h8" without quotes

I want to copy the above formula down. The value in B3 is a singular global value, so I don't want to create a column for it. So I tried:

"OFFSET(INDIRECT($B$3),2+row(),0)" array entered, but it only returns the first value in the array.

Any idea how to fix this, or alternatives so I can copy the formula down?
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
Ok, so it seems that when you are getting to the end of the predefined array (C8:H8) anywhere south of that range is outside of it, you are having an error.
If you make the starting point a single point instead of an array it should work: Start here... got x up or down, go y up or down... then the 3rd and 4th argument of offset indicate the size of the range.

I assume you want it to cover the range: C8:H8, C9:H9, C10:H10... as you go down...

so it would be --> OFFSET(INDIRECT($B$3),2+row(),0,1,6)

To be honest, I would love it if one of the veterans here explained exactly why... but that will make it work for you.
 
Last edited:
Upvote 0
I agree that you should start with a fixed (single) cell, then create the INDIRECT range from that. Something like...
INDIRECT($A$2, 1,1,0,6)
Not sure you need the offset for this.

Ignoring the fancy formulas, what would the range look like as you copied it down?
 
Upvote 0
OFFSET and INDIRECT are volatile and to some degree (functionally) kindred. Better avoid mixing them altogether...

Let K1 house the first instance of the required formula.

=OFFSET($C$8,ROWS($K$1:K1)-1,0,1,COLUMNS(C8:H8))

This picks out everything from C8:H8 (Note that you can replace the COLUMNS bit with 6 if so desired.).

Copied down to K2, the formula will pick out C9:H9, and so on.
 
Upvote 0
I agree that you should start with a fixed (single) cell, then create the INDIRECT range from that. Something like...
INDIRECT($A$2, 1,1,0,6)
Not sure you need the offset for this.

Ignoring the fancy formulas, what would the range look like as you copied it down?

FDibbz, are you sure you can add offset parameters like that without an offset function?
 
Upvote 0
Thanks to all those that replied!

I tried out all your posted solutions.

so it would be --> OFFSET(INDIRECT($B$3),2+row(),0,1,6)
Thanks for your post! Unfortunately, this seems to yield the same issue, in that it only returns the first value of the array.

OFFSET($A$2, 1,1,0,6)
Thanks for your post! Unfortunately, it gives me a #REF error.

Try this: OFFSET(INDIRECT($B$3),ROWS($A$1:$A2),0)
Thanks for your post! It seems to work (quick test), though I haven't implemented it yet in my formula. I'm assuming it's because ROWS is less "volatile" than ROW?

=OFFSET($C$8,ROWS($K$1:K1)-1,0,1,COLUMNS(C8:H8))
Thanks Aladin! Not sure why, but when I copy the formula down, it returns every second row. I may have implemented it wrong though.
 
Upvote 0
Upvote 0

Forum statistics

Threads
1,214,788
Messages
6,121,597
Members
449,038
Latest member
Arbind kumar

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