Excel formula for portion of named range

CB1234

New Member
Joined
Feb 23, 2011
Messages
8
Hi: I'm trying to figure out a way to have a formula refer to just a portion of a named range. For example, if the range "myrange" contains the following pieces of data:

10
15
20
25
30
35

I want a formula that refers to just the first x rows of myrange.

So for example, if x = 3, and I had a formula looking for the max of that portion of myrange, it would return 20 (the max of the first three pieces of data)

Is there a simple way to do this? Thank you for any help!
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
Assuming B1 held the number of rows, something like this:

Book1
ABC
110320
215
320
425
530
635
Sheet1
Cell Formulas
RangeFormula
C1C1=MAX(OFFSET(myrange,,,B1))
 
Upvote 0
You can do it as follows:
Book1
LM
1110
22
33
44
55
66
77
87
98
109
110
Sheet1
Cell Formulas
RangeFormula
M1M1=SUM(INDEX(X,1):INDEX(X,4))


X is defined as =Sheet1!$L$1:$L$11.

J.Ty.
 
Upvote 0
Thank you! I didn't realize you could "colon" together two index formulas like that!
Yes, that works and has the advantage over OFFSET that the formula is not volatile.

J.Ty.
 
Upvote 0

Forum statistics

Threads
1,215,744
Messages
6,126,629
Members
449,323
Latest member
Smarti1

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