How to Increment Excel cell reference by any number

ArranI

New Member
Joined
Jun 26, 2024
Messages
5
Office Version
  1. 365
Platform
  1. Windows
Hello,

Hopefully a simple question for those much more advanced than I.

I'm looking to determine a way of referencing a cell range which increases in increments of 1, however the range that is to show the data increases in increments of 6.

i.e.
A2 to equal L2
A7 to equal L3
A12 to equal L4
A17 to equal L5

The example file below is a simplified aspect of what I'm after, with only 4 Part#s.
The actual file, contains hundreds which is why a manual option is not feasible.

Would really appreciate any insights into how best to solve this.

Thank you!

AI - Example.xlsx
ABCDEFGHIJKLMN
1Part#DescriptionLeadtimeDivisionW1W2W3Part#DescriptionLeadtime
2124578Nut20Balance53530124578Nut20
3124578Nut20Stock20535134679Pin20
4124578Nut20Transit50215487Lever35
5124578Nut20 - North505235689Bolt30
6124578Nut20 - South10200
7134679Pin20Balance-102-11
8134679Pin20Stock0-102
9134679Pin20Transit20
10134679Pin20 - North205
11134679Pin20 - South888
12215487Lever35Balance104085
13215487Lever35Stock501040
14215487Lever35Transit5050
15215487Lever35 - North3005
16215487Lever35 - South10200
17235689Bolt30Balance-152520
18235689Bolt30Stock0-1525
19235689Bolt30Transit60
20235689Bolt30 - North505
21235689Bolt30 - South10200
Sheet1
Cell Formulas
RangeFormula
E17:G17,E12:G12,E7:G7,E2:G2E2=(SUM(E3:E4)-(SUM(E5:E6)))
F3:G3,F18:G18,F13:G13,F8:G8F3=E2
A3:C6,A18:C21,A13:C16,A8:C11A3=A2
Cells with Conditional Formatting
CellConditionCell FormatStop If True
E2:G21Cell Value<0textNO
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
Welcome to the Board!

You can place this formula in cell A2 and copy down:
Excel Formula:
=INDIRECT("L" & INT((ROW()+8)/5))
 
Upvote 1
Hi & welcome to MrExcel.
Another option in A2 only
Fluff.xlsm
ABCDEFGHIJKLMN
1Part#DescriptionLeadtimeDivisionW1W2W3Part#DescriptionLeadtime
2124578Nut20Balance53530124578Nut20
3124578Nut20Stock20535134679Pin20
4124578Nut20Transit50215487Lever35
5124578Nut20 - North505235689Bolt30
6124578Nut20 - South10200
7134679Pin20Balance-102-11
8134679Pin20Stock0-102
9134679Pin20Transit20
10134679Pin20 - North205
11134679Pin20 - South888
12215487Lever35Balance104085
13215487Lever35Stock501040
14215487Lever35Transit5050
15215487Lever35 - North3005
16215487Lever35 - South10200
17235689Bolt30Balance-152520
18235689Bolt30Stock0-1525
19235689Bolt30Transit60
20235689Bolt30 - North505
21235689Bolt30 - South10200
22
Sheet6
Cell Formulas
RangeFormula
A2:C21A2=LET(f,FILTER(L2:N100,L2:L100<>""),r,ROWS(f)*5,INDEX(f,CEILING.MATH(SEQUENCE(r)/5,1),{1,2,3}))
E17:G17,E12:G12,E7:G7,E2:G2E2=(SUM(E3:E4)-(SUM(E5:E6)))
F3:G3,F18:G18,F13:G13,F8:G8F3=E2
Dynamic array formulas.
 
Upvote 0
Welcome to the Board!

You can place this formula in cell A2 and copy down:
Excel Formula:
=INDIRECT("L" & INT((ROW()+8)/5))
Hi Joe,

Thanks for replying so quickly and for the kind welcome!

That works great for the simplified version I provided.
Trying to extrapolate it to the larger data set I'm working with (with many more rows) however results in an issue which I'm guessing is due to the increasing INT value exceeding the boundary for the next integer up.
Additionally for the larger data set, the data source to pull from is on another sheet, I'm not sure how this combines with the INDIRECT formula, however if you know then I'd appreciate if you could let me know.

I will re-embed the sheets with the actual number of rows for each Part#.

Could you enlighten me on how you derived the ROW()+8 / 2 ratio, so that I can apply the same logic for future?

AI - Example.xlsx
ABCDEFG
1Part#DescriptionLeadtimeDivisionW1W2W3
2124578Nut20Balance53530
3124578Nut20Stock20535
4124578Nut20Transit50
5124578Nut20 - North505
6124578Nut20 - South10200
7124578Nut20 - A
8124578Nut20 - B
9124578Nut20 - C
10124578Nut20 - D
11124578Nut20 - E
12124578Nut20 - F
13124578Nut20 - G
14124578Nut20 - H
15124578Nut20 - I
16124578Nut20 - J
17134679Pin20Balance-102-11
18134679Pin20Stock0-102
19134679Pin20Transit20
20134679Pin20 - North205
21134679Pin20 - South888
22134679Pin20 - A
23134679Pin20 - B
24134679Pin20 - C
25134679Pin20 - D
26134679Pin20 - E
27134679Pin20 - F
28134679Pin20 - G
29134679Pin20 - H
30134679Pin20 - I
31134679Pin20 - J
32215487Lever35Balance104085
33215487Lever35Stock501040
34215487Lever35Transit5050
35215487Lever35 - North3005
36215487Lever35 - South10200
37215487Lever35 - A
38215487Lever35 - B
39215487Lever35 - C
40215487Lever35 - D
41215487Lever35 - E
42215487Lever35 - F
43215487Lever35 - G
44215487Lever35 - H
45215487Lever35 - I
46215487Lever35 - J
47235689Bolt30Balance-152520
48235689Bolt30Stock0-1525
49235689Bolt30Transit60
50235689Bolt30 - North505
51235689Bolt30 - South10200
52235689Bolt30 - A
53235689Bolt30 - B
54235689Bolt30 - C
55235689Bolt30 - D
56235689Bolt30 - E
57235689Bolt30 - F
58235689Bolt30 - G
59235689Bolt30 - H
60235689Bolt30 - I
61235689Bolt30 - J
Sheet1
Cell Formulas
RangeFormula
E47:G47,E32:G32,E17:G17,E2:G2E2=(SUM(E3:E4)-(SUM(E5:E16)))
F3:G3,F48:G48,F33:G33,F18:G18F3=E2
B3:C16,B48:C61,B33:C46,B18:C31B3=B2
Cells with Conditional Formatting
CellConditionCell FormatStop If True
E2:G9,E17:G24,E32:G39,E47:G54Cell Value<0textNO


AI - Example.xlsx
ABC
1Part#DescriptionLeadtime
2124578Nut20
3134679Pin20
4215487Lever35
5235689Bolt30
DATA SOURCE
 
Upvote 0
an issue which I'm guessing is due to the increasing INT value exceeding the boundary for the next integer up.
This changes the question COMPLETELY, and is a good example of why you should NEVER over-simplify your question. You had made it sound like it was a static increment.
When you do that, you risk getting an answer that works for the exact question and example your originally posted, but not for your actual situation (because you mis-represented the actual situation to us).

If the sections may be different sizes, how do you propose we identify that?
Can we look in column D, and every time the word "Balance" appears, it should move to the next part?
Is that a good indicator we can use?
 
Upvote 0
With the formula I suggested, that will spill cols A:C for all rows.
Fluff.xlsm
ABCDEFG
1Part#DescriptionLeadtimeDivisionW1W2W3
2124578Nut20Balance53530
3124578Nut20Stock20535
4124578Nut20Transit50
5124578Nut20 - North505
6124578Nut20 - South10200
7124578Nut20 - A
8124578Nut20 - B
9124578Nut20 - C
10124578Nut20 - D
11124578Nut20 - E
12124578Nut20 - F
13124578Nut20 - G
14124578Nut20 - H
15124578Nut20 - I
16124578Nut20 - J
17134679Pin20Balance-102-11
18134679Pin20Stock0-102
19134679Pin20Transit20
20134679Pin20 - North205
21134679Pin20 - South888
22134679Pin20 - A
23134679Pin20 - B
24134679Pin20 - C
25134679Pin20 - D
26134679Pin20 - E
27134679Pin20 - F
28134679Pin20 - G
29134679Pin20 - H
30134679Pin20 - I
31134679Pin20 - J
32215487Lever35Balance104085
33215487Lever35Stock501040
34215487Lever35Transit5050
35215487Lever35 - North3005
36215487Lever35 - South10200
37215487Lever35 - A
38215487Lever35 - B
39215487Lever35 - C
40215487Lever35 - D
41215487Lever35 - E
42215487Lever35 - F
43215487Lever35 - G
44215487Lever35 - H
45215487Lever35 - I
46215487Lever35 - J
47235689Bolt30Balance-152520
48235689Bolt30Stock0-1525
49235689Bolt30Transit60
50235689Bolt30 - North505
51235689Bolt30 - South10200
52235689Bolt30 - A
53235689Bolt30 - B
54235689Bolt30 - C
55235689Bolt30 - D
56235689Bolt30 - E
57235689Bolt30 - F
58235689Bolt30 - G
59235689Bolt30 - H
60235689Bolt30 - I
61235689Bolt30 - J
62
Sheet6
Cell Formulas
RangeFormula
A2:C61A2=LET(f,FILTER('DATA SOURCE'!A2:C100,'DATA SOURCE'!A2:A100<>""),r,ROWS(f)*15,INDEX(f,CEILING.MATH(SEQUENCE(r)/15,1),{1,2,3}))
E47:G47,E32:G32,E17:G17,E2:G2E2=(SUM(E3:E4)-(SUM(E5:E16)))
F3:G3,F48:G48,F33:G33,F18:G18F3=E2
Dynamic array formulas.
 
Upvote 1
Solution
This changes the question COMPLETELY, and is a good example of why you should NEVER over-simplify your question. You had made it sound like it was a static increment.
When you do that, you risk getting an answer that works for the exact question and example your originally posted, but not for your actual situation (because you mis-represented the actual situation to us).

If the sections may be different sizes, how do you propose we identify that?
Can we look in column D, and every time the word "Balance" appears, it should move to the next part?
Is that a good indicator we can use?
Hi Joe,

Noted for future.

In answer to your questions:
Proposed sheet would have same size for all sections.
If it were to have differing sizes, then yes, "Balance" would indicate the beginning of a new section.
 
Upvote 0
Hello,

Hopefully a simple question for those much more advanced than I.

I'm looking to determine a way of referencing a cell range which increases in increments of 1, however the range that is to show the data increases in increments of 6.

i.e.
A2 to equal L2
A7 to equal L3
A12 to equal L4
A17 to equal L5

The example file below is a simplified aspect of what I'm after, with only 4 Part#s.
The actual file, contains hundreds which is why a manual option is not feasible.

Would really appreciate any insights into how best to solve this.

Thank you!
This is a perfect example of what should be done using VBA UserForms. You can create a front-end application that is built in Excel and never see the spreadsheets. It would take time to develop but once completed it would be a custom designed parts ordering system.
 
Upvote 0
With the formula I suggested, that will spill cols A:C for all rows.
Fluff.xlsm
ABCDEFG
1Part#DescriptionLeadtimeDivisionW1W2W3
2124578Nut20Balance53530
3124578Nut20Stock20535
4124578Nut20Transit50
5124578Nut20 - North505
6124578Nut20 - South10200
7124578Nut20 - A
8124578Nut20 - B
9124578Nut20 - C
10124578Nut20 - D
11124578Nut20 - E
12124578Nut20 - F
13124578Nut20 - G
14124578Nut20 - H
15124578Nut20 - I
16124578Nut20 - J
17134679Pin20Balance-102-11
18134679Pin20Stock0-102
19134679Pin20Transit20
20134679Pin20 - North205
21134679Pin20 - South888
22134679Pin20 - A
23134679Pin20 - B
24134679Pin20 - C
25134679Pin20 - D
26134679Pin20 - E
27134679Pin20 - F
28134679Pin20 - G
29134679Pin20 - H
30134679Pin20 - I
31134679Pin20 - J
32215487Lever35Balance104085
33215487Lever35Stock501040
34215487Lever35Transit5050
35215487Lever35 - North3005
36215487Lever35 - South10200
37215487Lever35 - A
38215487Lever35 - B
39215487Lever35 - C
40215487Lever35 - D
41215487Lever35 - E
42215487Lever35 - F
43215487Lever35 - G
44215487Lever35 - H
45215487Lever35 - I
46215487Lever35 - J
47235689Bolt30Balance-152520
48235689Bolt30Stock0-1525
49235689Bolt30Transit60
50235689Bolt30 - North505
51235689Bolt30 - South10200
52235689Bolt30 - A
53235689Bolt30 - B
54235689Bolt30 - C
55235689Bolt30 - D
56235689Bolt30 - E
57235689Bolt30 - F
58235689Bolt30 - G
59235689Bolt30 - H
60235689Bolt30 - I
61235689Bolt30 - J
62
Sheet6
Cell Formulas
RangeFormula
A2:C61A2=LET(f,FILTER('DATA SOURCE'!A2:C100,'DATA SOURCE'!A2:A100<>""),r,ROWS(f)*15,INDEX(f,CEILING.MATH(SEQUENCE(r)/15,1),{1,2,3}))
E47:G47,E32:G32,E17:G17,E2:G2E2=(SUM(E3:E4)-(SUM(E5:E16)))
F3:G3,F48:G48,F33:G33,F18:G18F3=E2
Dynamic array formulas.
Hi Fluff,

Thanks very much for the solution.
Entered the formula into my sheet, and I'm replicating the results you're seeing.

I'll have a play around to see if I can decipher how/why it works.

Appreciate the help, thanks again!
 
Upvote 0
Hi Joe,

Noted for future.

In answer to your questions:
Proposed sheet would have same size for all sections.
If it were to have differing sizes, then yes, "Balance" would indicate the beginning of a new section.
Did fluff's solution work for you?
 
Upvote 0

Forum statistics

Threads
1,221,310
Messages
6,159,173
Members
451,543
Latest member
cesymcox

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