No, not the row number but the COUNT of rows being referenced.I would have definitely thought ROWS and COLUMNS as being non-volatile. But correct me if I am wrong, regardless of the content of the cell, ROWS($A$1:A1) would return the row number right?
YesI mean to say if in A1 to A5 we have volatile formulas such as the ones described in the link you posted, the Row [COUNT] number would still return correctly... no?
It's all about KISS.This said, Yes using the first cell in which the target formula is entered as anchor, will definitely make it easier to maintain.
Thanks again, learned something new.
ROW() is not volatile.Aladin Akyurek said:I have ever introduced and used
ROW()-ROW($C$2)+1
which is volatile because ROW() is volatile.
=MRAND(30,0,2099)+1000
=MRAND(30,0,2099,TRUE)+1000
Excel Workbook | |||||
---|---|---|---|---|---|
A | B | C | |||
1 | Random Nos | Ascending | Descending | ||
2 | 1043 | 1021 | 3034 | ||
3 | 2268 | 1043 | 2963 | ||
4 | 2922 | 1117 | 2922 | ||
5 | 2420 | 1128 | 2730 | ||
6 | 1356 | 1140 | 2704 | ||
7 | 1627 | 1356 | 2548 | ||
8 | 2730 | 1397 | 2508 | ||
9 | 2704 | 1490 | 2429 | ||
10 | 2508 | 1543 | 2420 | ||
11 | 1397 | 1578 | 2401 | ||
12 | 1737 | 1592 | 2351 | ||
13 | 1578 | 1627 | 2337 | ||
14 | 1898 | 1650 | 2268 | ||
15 | 1490 | 1737 | 2007 | ||
16 | 1911 | 1898 | 1911 | ||
17 | 1592 | 1911 | 1898 | ||
18 | 1021 | 2007 | 1737 | ||
19 | 2429 | 2268 | 1650 | ||
20 | 2351 | 2337 | 1627 | ||
21 | 2337 | 2351 | 1592 | ||
22 | 3034 | 2401 | 1578 | ||
23 | 2401 | 2420 | 1543 | ||
24 | 1128 | 2429 | 1490 | ||
25 | 1543 | 2508 | 1397 | ||
26 | 2548 | 2548 | 1356 | ||
27 | 1117 | 2704 | 1140 | ||
28 | 1650 | 2730 | 1128 | ||
29 | 1140 | 2922 | 1117 | ||
30 | 2007 | 2963 | 1043 | ||
31 | 2963 | 3034 | 1021 | ||
Sheet1 |
=SMALL(MRAND(30,0,2099[COLOR=#ff0000],TRUE[/COLOR])+1000,ROW($A$1:$A$30))
Thanks Aladin, really very informative.
Kind of expensive using 2 functions plus 2 math operations:Aladin Akyurek said:Although I'm sure it's not needed, ROW()-ROW($C$2)+1 and ROWS($C$2:C2) are both robust when used in a formula which is entered in C2. Cyril, I apologize for the repeat.
Cyril, I apologize for the repeat.