Increment cells in a specific way

Nathaaan30

New Member
Joined
Mar 8, 2023
Messages
15
Office Version
  1. 365
  2. 2021
Platform
  1. Windows
  2. MacOS
  3. Web
Hello, I have a fairly specific question and not knowing how to formulate it, I did not find an answer on the internet.

Let's take a B1 cell, I want in this box B1 to have the maximum value among the values of A1:A50, so I write =MAX(A1:A50).

Now in my next box (B2), this time I want to have the maximum value of boxes A100:A150.

The problem is that by using autofill, the software writes =MAX(A2:A51) and not =MAX(A100:A150).

I tried to "fix" the dozens and units of my colones with a $ (with =MAX(A0$1:A0$50) but it doesn't work, so I rely on you.

Thank you in advance.
 
Try this:
mr excel questions 13.xlsm
ABC
1183506613
2184506420
3102506303
4174506503
532506716
693506841
766506651
8142505417
9227505493
10181506511
112180
121910
13590
14190
15243
1649
17224
18197
19234
20130
2181
2236
23241
2482
2561
26164
27121
2833
29151
30222
31173
32124
3343
34146
3579
3623
37181
3862
39120
4089
4128
42184
43195
44146
4596
46159
4768
48142
49195
50220
5139
52175
53107
5484
5530
5643
57222
58211
5911
60215
6160
62154
63159
64107
65248
66107
67176
68130
6952
70205
71133
72226
7385
74162
75116
76206
77134
78128
79119
8059
81177
82125
8322
84215
85157
86211
87193
8819
89177
9024
9185
92101
9350
94118
95246
9625
97218
9863
9986
100205
10121
102230
103117
10415
105241
106181
107211
108131
10917
11069
111207
112194
113225
114105
115239
11610
11750
118173
11944
120118
12198
122153
123130
12456
125140
12625
12756
128168
129174
13035
131237
132184
133195
134159
135248
13639
137103
13893
13945
14083
14171
142185
143240
14470
14524
146170
147210
148191
149110
15013
151101
15252
15386
154248
155243
156230
157135
15882
159239
16016
161100
16260
16397
164211
16517
166211
16758
168198
169143
170241
171168
172166
173157
174173
17556
176112
17767
17846
179208
18025
181235
18223
18354
184114
185247
186132
187156
188210
18977
19028
19150
19272
19360
19413
195138
196217
197192
198173
199163
200203
20165
202193
203171
204218
20518
206170
207206
208241
20912
210227
211157
212202
21359
214119
21536
216220
21730
218103
219186
220136
22178
222203
223179
224182
225182
226245
22753
228129
22958
230250
231214
23284
23377
23492
235118
236195
23790
23887
23935
240213
24158
24232
243137
244217
24576
246229
247152
248214
24921
25047
251132
25237
25317
254206
255205
25671
257184
25876
259170
260130
26169
262227
26399
26475
265138
266172
267133
268147
269245
270217
27173
272228
273169
274138
27549
27620
277155
278138
279171
28082
28117
28281
283221
284244
285186
286200
287111
288203
289233
290151
291129
29220
29379
294126
29551
296200
297250
298140
299160
30066
30148
302159
30334
30483
305226
306173
307146
30878
30996
310159
311223
312196
313229
31498
31517
316170
317114
318162
31991
320236
321213
322201
323174
324159
325180
326153
327176
32890
32958
330199
331205
33291
33377
334173
33557
33668
337142
33821
33962
340219
341132
34281
343198
34440
345239
34640
34749
348162
34964
350190
35147
35274
353138
354101
355197
35617
35723
358181
35970
360124
361106
362122
36354
36433
365173
36663
36755
36848
369241
370187
371190
372248
373246
37422
375137
37669
37733
378117
37962
38048
38114
38249
383246
384211
385155
386140
387181
38864
38988
390103
39123
392144
39375
394219
39548
396185
39755
39840
39952
40099
40185
40286
403126
40436
40576
40684
40729
408201
409142
410186
411146
41245
413136
41451
415156
416171
417174
418179
419186
42033
421220
42230
423136
424156
425131
426206
427179
42813
429101
430243
43169
43215
43320
43417
43560
43663
43722
438178
439166
440234
44144
44260
443128
44457
44546
446155
447110
44864
44980
450162
451199
45233
45378
454212
455128
456140
457240
458108
45933
460222
461232
462141
463125
464145
46523
466155
467146
46869
46947
47062
471160
472237
473213
474185
475193
476172
477138
478195
479106
48028
48180
482133
48389
484214
485236
486155
48747
488128
48913
490202
49130
492149
49345
494157
49525
496199
497176
498150
49972
50046
Sheet9
Cell Formulas
RangeFormula
C1:C10C1=SUM(INDEX($A$1:$A$500,((ROW(A1)-1)*50)+1,1):INDEX($A$1:$A$500,((ROW(A1))*50),1))
B1:B14B1=COUNT(INDEX($A$1:$A$500,((ROW(A1)-1)*50)+1,1):INDEX($A$1:$A$500,((ROW(A1))*50),1))
 
Upvote 0

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Here are the formulas for each half of the index function being used to obtain cell references:

Excel Formula:
=(INDEX($A$1:$A$500,((ROW(A1)-1)*50)+1,1))

Excel Formula:
=INDEX($A$1:$A$500,((ROW(A1))*50),1)

Put a colon between the two and it behaves as a a cell/range reference:
Excel Formula:
=INDEX($A$1:$A$500,((ROW(A1)-1)*50)+1,1):INDEX($A$1:$A$500,((ROW(A1))*50),1)

So, to get Maximum:
Excel Formula:
=MAX(INDEX($A$1:$A$500,((ROW(A1)-1)*50)+1,1):INDEX($A$1:$A$500,((ROW(A1))*50),1))
 
Upvote 0
My take on this
Excel Formula:
=MAX(INDEX(A:A,ROWS(A$1:A1)*100-99):INDEX(A:A,ROWS(A$1:A1)*100-50))
 
Upvote 0
Hello, I have a fairly specific question and not knowing how to formulate it, I did not find an answer on the internet.

Let's take a B1 cell, I want in this box B1 to have the maximum value among the values of A1:A50, so I write =MAX(A1:A50).

Now in my next box (B2), this time I want to have the maximum value of boxes A100:A150.

The problem is that by using autofill, the software writes =MAX(A2:A51) and not =MAX(A100:A150).

I tried to "fix" the dozens and units of my colones with a $ (with =MAX(A0$1:A0$50) but it doesn't work, so I rely on you.

Thank you in advance.
I've just arrived home, so I'll be able to illustrate my whole problem with a picture, maybe that will help you understand.

I have a sinusoidal graph (see the picture) which corresponds to the position x(t) in meters of a mass (column B) as a function of time (t) in seconds (column A). The mass oscillates from right to left and its position therefore alternates between negative and positive.

I need to know the average amplitude of the movement. To do this I need to know the extremums of my function. So I had the idea to look for my extremum each time on a given interval which differs from +50 each time.

In red, I look for the minimum of my column B of the intervals B1:B50 then B100:B150 then B200:B250 and so on, the results are reported in the column "Min".

In green, I look for the maximum in the remaining intervals, B50:B100 then B150:B200 then B250:B300 and so on. The results are reported in the "Max" column.

The idea is that each new row in the "Min" column calculates the minimum of the next interval (so B300:B350 then B400:B450 ect...) and that each new row in the "Max" column does the same for the remaining intervals (so B350:B400 then B450:B500 ect...)
 

Attachments

  • Excel.png
    Excel.png
    111.9 KB · Views: 6
Upvote 0
My take on this
Excel Formula:
=MAX(INDEX(A:A,ROWS(A$1:A1)*100-99):INDEX(A:A,ROWS(A$1:A1)*100-50))
So I tried to use this by adapting the formula to column B but the software gives me an error on the first "$B$1:$B$500".
Here are the formulas for each half of the index function being used to obtain cell references:

Excel Formula:
=(INDEX($A$1:$A$500,((ROW(A1)-1)*50)+1,1))

Excel Formula:
=INDEX($A$1:$A$500,((ROW(A1))*50),1)

Put a colon between the two and it behaves as a a cell/range reference:
Excel Formula:
=INDEX($A$1:$A$500,((ROW(A1)-1)*50)+1,1):INDEX($A$1:$A$500,((ROW(A1))*50),1)

So, to get Maximum:
Excel Formula:
=MAX(INDEX($A$1:$A$500,((ROW(A1)-1)*50)+1,1):INDEX($A$1:$A$500,((ROW(A1))*50),1))
Same here, I have an error that I don't know how to solve :(
 
Upvote 0
What error did you get?
It doesn't do anything for me, I just get the error message that the formula doesn't fit and then the software highlights that area (see image).

Note that I tried to replace the "B3" with a simple "B" but it didn't change anything.
 

Attachments

  • Excel 2.png
    Excel 2.png
    16.1 KB · Views: 5
Upvote 0
Ok, you need to change the commas to semi-colons
 
Upvote 0
Ok, you need to change the commas to semi-colons
Ok I did it, now I have an error #NAME? Error due to an invalid name.

I tried again to swap the "B" with "B3" to select only the numeric values but it didn't change anything.
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,337
Members
452,636
Latest member
laura12345

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