Offset Function

c0087

Board Regular
Joined
Jul 13, 2015
Messages
85
Office Version
  1. 365
Platform
  1. Windows
How would I edit this function so that I could get every 3rd row, then 5th row, 3rd row, 5th row, etc...

=OFFSET($A$1,(ROW()-1)*3,0)
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
How about this?
Excel Formula:
=LET(m,MOD(ROW(A2:A10),2),FILTER(A2:A10,m=1))
 
Upvote 0
How about this?
Excel Formula:
=LET(m,MOD(ROW(A2:A10),2),FILTER(A2:A10,m=1))
It only returns every 2nd row. Same as if i was using =OFFSET($A$1,(ROW()-1)2,0).

I'd prefer it in the OFFSET function so that it easier to drag around, too
 
Upvote 0
Can you show an example of what you're trying to achieve?
 
Upvote 0
If I understand correctly, you want a formula that you can drag to repeat the 3rd and 5th value.

Book1
AB
1A
2BE
3CC
4DE
5EC
6FE
7GC
8HE
9IC
10JE
11KC
12LE
13MC
14NE
15OC
16PE
17QC
18RE
19SC
20TE
21UC
22VE
23WC
24XE
25YC
26ZE
27[C
28\E
29]C
30^E
31_C
32`E
33aC
34bE
35cC
36dE
37eC
38fE
39gC
40hE
41iC
42jE
43kC
44lE
45mC
46nE
47oC
48pE
49qC
50rE
Sheet1
Cell Formulas
RangeFormula
B2:B50B2=LET(a,OFFSET($A$1,2,0),b,OFFSET(a,2,0),IF(MOD(ROW(),2),a,b))
 
Upvote 0
something inside the OFFSET function that would return every 3rd row, then 5th row, etc


11
24
39
412
517
620
725
8
9
10
 
Upvote 0
If I understand correctly, you want a formula that you can drag to repeat the 3rd and 5th value.

Book1
AB
1A
2BE
3CC
4DE
5EC
6FE
7GC
8HE
9IC
10JE
11KC
12LE
13MC
14NE
15OC
16PE
17QC
18RE
19SC
20TE
21UC
22VE
23WC
24XE
25YC
26ZE
27[C
28\E
29]C
30^E
31_C
32`E
33aC
34bE
35cC
36dE
37eC
38fE
39gC
40hE
41iC
42jE
43kC
44lE
45mC
46nE
47oC
48pE
49qC
50rE
Sheet1
Cell Formulas
RangeFormula
B2:B50B2=LET(a,OFFSET($A$1,2,0),b,OFFSET(a,2,0),IF(MOD(ROW(),2),a,b))
Sorry for the confusion. I don't want it to repeat the 3rd and 5th row, but keep taking every 3rd and 5th row as i drag down
 
Upvote 0
If you're ok with a helper column.
Book1
ABCDE
1DataHelperResult
2101
3234
4389
541112
651617
761920
872425
982728
1093233
11103536
12114041
13124344
14134849
151451
161556
171659
181764
191867
201972
212075
222180
232283
242388
2524
2625
2726
2827
2928
3029
3130
3231
Sheet1
Cell Formulas
RangeFormula
A2:A51A2=SEQUENCE(50)
C2:C14C2=OFFSET($A$2,B2,0)
B3:B24B3=IF(MOD(ROW(),2),B2+3,B2+5)
Dynamic array formulas.
 
Upvote 0
Upvote 0
Here's the best I can come up with so far that does not use a helper column and let you drag. Only draw back is you have to reference the first value A1 yourself so it knows where to start.
Book1.xlsx
AB
111
224
339
4412
5517
6620
7725
8828
9933
101036
111141
121244
131349
1414
1515
1616
1717
1818
1919
2020
2121
2222
2323
2424
2525
2626
2727
2828
2929
3030
3131
3232
3333
3434
3535
3636
3737
3838
3939
4040
4141
4242
4343
4444
4545
4646
4747
4848
4949
5050
Sheet1
Cell Formulas
RangeFormula
B1B1=A1
B2:B13B2=LET(a,INDIRECT(CELL("address",INDIRECT("A"&MATCH(B1,$A$1:$A$50,0)))),OFFSET(a,IF(MOD(ROW(),2),5,3),0))
 
Upvote 0

Forum statistics

Threads
1,215,353
Messages
6,124,458
Members
449,161
Latest member
NHOJ

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