trouble understanding the OFFSET function

Special K

Board Regular
Joined
Jun 20, 2011
Messages
83
Office Version
  1. 2010
Platform
  1. Windows
I am having some trouble understanding the functionality of the OFFSET function. I have the following sample worksheet:

foo_test.xlsx
ABCDE
1DateDataOFFSET(B2,0,0,1)1
21/1/2023$1.00OFFSET(B2,0,0,2)1
31/2/2023$2.00OFFSET(B2,0,0,3)2
41/3/2023$3.00OFFSET(B2,0,0,4)3
51/4/2023$4.00OFFSET(B2,0,0,5)4
61/5/2023$5.00OFFSET(B2,0,0,10)5
71/6/2023$6.00OFFSET(B2,0,0,19)6
81/7/2023$7.00
91/8/2023$8.00
101/9/2023$9.00
111/10/2023$10.00
121/11/2023$11.00
131/12/2023$12.00
141/13/2023$13.00OFFSET(B2,0,0,1)1
151/14/2023$14.00OFFSET(B2,0,0,2)#VALUE!
161/15/2023$15.00OFFSET(B2,0,0,3)#VALUE!
171/16/2023$16.00OFFSET(B2,0,0,4)#VALUE!
181/17/2023$17.00OFFSET(B2,0,0,5)#VALUE!
191/18/2023$18.00OFFSET(B2,0,0,10)#VALUE!
201/19/2023$19.00OFFSET(B2,0,0,19)19
Sheet1


I have the same set of OFFSET formulas in cells E1:E7 and E14:20. Here are my questions:

1. What number is supposed to be displayed in the cell when the OFFSET function returns a range of values? For example, both OFFSET(B2,0,0,1) and OFFSET(B2,0,0,2) return 1, which is the first number in the range, but OFFSET(B2,0,0,3) returns 2, which is the second number in the range. What is the pattern here?

2. Why do the formulas in cells E2:E6 return a number, but the exact same formulas entered into cells E15:E19 return #VALUE!? The reference cell, B2, is identical in all cases.
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
 
Upvote 0
I just updated my profile. I'm using Office 2010 and Windows 10.
 
Upvote 0
Thanks for that.
The formula is using what is known as implicit intersection. What that means is it is trying to pull the value from the same row the formula is on.
So E3:E7 & E20 are pulling the value from col B on their respective rows, but E15:E19 return an error as the array created by offset does not cover the rows those formulae are on.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,179
Members
453,021
Latest member
Justyna P

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