NTIMES returns the values that occur at the specified number of times with full control over data types(s) inclusion/exclusion/replacement
(The code is modular (as all my other functions) allowing for easy reusing/swapping/optimizing over time. See all the modules below, after the description)
NTIMES takes eight parameters, one required and seven optional, as follows:
A) The first parameter, required, specifies the function input and can be a cell, range, or array
B) The second parameter, optional, instructs the function to return values that occur at this specified number of times and can be any natural number (i.e. 1 or greater) or omitted to imply 1
Note that leaving this parameter omitted or setting it to 1 makes the function equivalent (and more straightforward) to UNIQUE(reference,,1) where the "exactly_once" parameter is turned on
Note that this argument structure which takes only natural numbers is accomplished by my PLSN module shown below
C) The third parameter, optional, is a logical switch and specifies how the blanks in the input will be treated, as follows:
0 or omitted or FALSE, indicates that all four types of blanks, i.e. 31, 32, 33, and 34, (see the latest update of XTYPE) have the same overall value, and therefore, their total count will be compared against the number specified in the second parameter above
1 or TRUE or any number other than 0, indicates that the four types of blanks will be counted separately and then compared against the number specified in the second parameter above
Note that this argument structure matches the Excel's native way of handling on/off arguments for parameters and is accomplished by my PLSL module shown below (applies to the fourth parameter below as well)
D) The fourth parameter, optional, is a logical switch and specifies the orientation of the function output, as follows:
0 or omitted or FALSE, for horizontal (default) output
1 or TRUE or any number other than 0, for vertical output
Note that unlike the native UNIQUE function, NTIMES linearizes the output. If you need the output to have a desired number of rows or columns, feel free to use my PROCESS function
E) The fifth parameter, optional, specifies the type(s) of data that can be excluded from the main output and takes one or more of twenty-six arguments:
1, for number
2, for text
3, for blank
4, for logical
16, for error
31, for real blank
32, for formula blank
33, for space blank
34, for pasted blank
41, for TRUE
42, for FALSE
161, for #NULL! error
162, for #DIV/0! error
163, for #VALUE! error
164, for #REF! error
165, for #NAME? error
166, for #NUM! error
167, for #N/A error
168, for #GETTING_DATA error
169, for #SPILL! error
1610, for #CONNECT! error
1611, for #BLOCKED! error
1612, for #UNKNOWN! error
1613, for #FIELD! error
1614, for #CALC! error
1619, for #PYTHON! error
Note that if you need to enter more than one argument, you need to use the array brackets "{}" such as {1,3} for excluding numbers and blanks or {2,4,16} for excluding texts, logicals, and errors; see the attached XL2BB examples (the number of types permutations is huge; I have only shown a few examples); this parameter as well as the next (include_types) allow for a remarkable level of flexibility and full resolution for managing data types in the function output
Note that excluding type(s) may cause the output spill to auto-shrink, if the output contains the specified type(s). If you don't want the output to auto-shrink, you need to put a blank ("") in the seventh parameter, i.e. replace_with, as described below in section G
Note that excluding type(s) that are not available in the output will have no effect on the output
F) The sixth parameter, optional, specifies the type(s) of data that can be included in the main output and takes one or more of twenty-six arguments, exactly like the fifth parameter in section E above
Note that both exclude_types and include_types cannot be used simultaneously
Note that using include_types (unless all types are included as by {1,2,3,4,16} for example) will also cause the main output spill to auto-shrink. Again, if you don't want the output to auto-shrink, you need to put a blank ("") in the seventh parameter, i.e. replace_with, as described below in section G
Note that including type(s) that are not available in the output will lead to an "empty" #CALC! error with the message that "Empty arrays are not supported"
G) The seventh parameter, optional, specifies a single entry of any desired data type (i.e. number, text, blank, logical, or error) that can be used to replace any entries that were either directly excluded via the exclude_types parameter or indirectly excluded via the include_types parameter
Note that if including type(s) leads to an empty output, then use of replace_with will cause the specified element to appear for the entire range of the output prior to the inclusion
H) The eighth parameter, optional, specifies a single entry of any desired data type (i.e. number, text, blank, logical, or error) that can be displayed as the main function output if the output is empty, i.e. #CALC! with the message "Empty arrays are not supported"
(You can download my template from the link in my signature below, which makes it easier to obtain/test the functions compared to pasting from the text/XL2BB or entering the functions manually)
NTIMES
JAR (counting core of NTIMES)
JAS (filter core for NTIMES)
XERROR.TYPE (posted separately)
XTYPE (posted separately)
AllTypes
IO (shortened form of ISOMITTED)
NIO [shortened form of NOT(ISOMITTED)]
PLS (stands for "parameter limit, single")
(Returns the parameter if it is a single entry (not blank or error) and #N/A otherwise)
(Causes the function to crash to a single #N/A if the incorrect parameter is entered [either the wrong type or more than a single entry in array brackets "{}"])
PLSL (stands for "parameter limit, single logical")
(Returns 1 if the parameter is a single TRUE entry; 0 if the parameter is a single FALSE entry or is omitted; and #N/A otherwise)
(Causes the function to crash to a single #N/A if incorrect parameters are entered [either anything not logically evaluable or more than a single entry in array brackets "{}"]))
PLSN (stands for "parameter limit, single natural")
(Returns the parameter if it is a single natural number and #N/A otherwise)
(Causes the function to crash to a single #N/A if incorrect parameters are entered)
PO0 (Returns 0 if the parameter is omitted and the parameter itself otherwise)
T1F0 (Returns 1 if the reference is TRUE, 0 if the reference is FALSE, and #N/A otherwise)
ST1F0 [Returns the sum of all TRUE (1) and FALSE (0) elements of the reference (counting all elements that cannot be logically evaluated as 0)]
JAB (returns a number greater than or equal to 1 (i.e. TRUE) if the reference has the specified data type(s) and 0 (i.e. FALSE) otherwise)
JAC (module for 1D (FILTER-based) "exclude_types/include_types/replace_with" with auto-shrink)
JAI (module for "if_empty")
JAL (switch for "include_types/exclude_types")
JAN Returns TRUE if the reference is an array (i.e. is not a single element or is not omitted) and FALSE otherwise [simplified form of ISARRAY])
JAO (Returns TRUE if the reference contains at least one error and FALSE otherwise [simplified form of ISERRORS])
JAP (Returns TRUE if the reference contains at least one blank and FALSE otherwise [simplified form of ISBLANKS])
(The code is modular (as all my other functions) allowing for easy reusing/swapping/optimizing over time. See all the modules below, after the description)
NTIMES takes eight parameters, one required and seven optional, as follows:
A) The first parameter, required, specifies the function input and can be a cell, range, or array
B) The second parameter, optional, instructs the function to return values that occur at this specified number of times and can be any natural number (i.e. 1 or greater) or omitted to imply 1
Note that leaving this parameter omitted or setting it to 1 makes the function equivalent (and more straightforward) to UNIQUE(reference,,1) where the "exactly_once" parameter is turned on
Note that this argument structure which takes only natural numbers is accomplished by my PLSN module shown below
C) The third parameter, optional, is a logical switch and specifies how the blanks in the input will be treated, as follows:
0 or omitted or FALSE, indicates that all four types of blanks, i.e. 31, 32, 33, and 34, (see the latest update of XTYPE) have the same overall value, and therefore, their total count will be compared against the number specified in the second parameter above
1 or TRUE or any number other than 0, indicates that the four types of blanks will be counted separately and then compared against the number specified in the second parameter above
Note that this argument structure matches the Excel's native way of handling on/off arguments for parameters and is accomplished by my PLSL module shown below (applies to the fourth parameter below as well)
D) The fourth parameter, optional, is a logical switch and specifies the orientation of the function output, as follows:
0 or omitted or FALSE, for horizontal (default) output
1 or TRUE or any number other than 0, for vertical output
Note that unlike the native UNIQUE function, NTIMES linearizes the output. If you need the output to have a desired number of rows or columns, feel free to use my PROCESS function
E) The fifth parameter, optional, specifies the type(s) of data that can be excluded from the main output and takes one or more of twenty-six arguments:
1, for number
2, for text
3, for blank
4, for logical
16, for error
31, for real blank
32, for formula blank
33, for space blank
34, for pasted blank
41, for TRUE
42, for FALSE
161, for #NULL! error
162, for #DIV/0! error
163, for #VALUE! error
164, for #REF! error
165, for #NAME? error
166, for #NUM! error
167, for #N/A error
168, for #GETTING_DATA error
169, for #SPILL! error
1610, for #CONNECT! error
1611, for #BLOCKED! error
1612, for #UNKNOWN! error
1613, for #FIELD! error
1614, for #CALC! error
1619, for #PYTHON! error
Note that if you need to enter more than one argument, you need to use the array brackets "{}" such as {1,3} for excluding numbers and blanks or {2,4,16} for excluding texts, logicals, and errors; see the attached XL2BB examples (the number of types permutations is huge; I have only shown a few examples); this parameter as well as the next (include_types) allow for a remarkable level of flexibility and full resolution for managing data types in the function output
Note that excluding type(s) may cause the output spill to auto-shrink, if the output contains the specified type(s). If you don't want the output to auto-shrink, you need to put a blank ("") in the seventh parameter, i.e. replace_with, as described below in section G
Note that excluding type(s) that are not available in the output will have no effect on the output
F) The sixth parameter, optional, specifies the type(s) of data that can be included in the main output and takes one or more of twenty-six arguments, exactly like the fifth parameter in section E above
Note that both exclude_types and include_types cannot be used simultaneously
Note that using include_types (unless all types are included as by {1,2,3,4,16} for example) will also cause the main output spill to auto-shrink. Again, if you don't want the output to auto-shrink, you need to put a blank ("") in the seventh parameter, i.e. replace_with, as described below in section G
Note that including type(s) that are not available in the output will lead to an "empty" #CALC! error with the message that "Empty arrays are not supported"
G) The seventh parameter, optional, specifies a single entry of any desired data type (i.e. number, text, blank, logical, or error) that can be used to replace any entries that were either directly excluded via the exclude_types parameter or indirectly excluded via the include_types parameter
Note that if including type(s) leads to an empty output, then use of replace_with will cause the specified element to appear for the entire range of the output prior to the inclusion
H) The eighth parameter, optional, specifies a single entry of any desired data type (i.e. number, text, blank, logical, or error) that can be displayed as the main function output if the output is empty, i.e. #CALC! with the message "Empty arrays are not supported"
(You can download my template from the link in my signature below, which makes it easier to obtain/test the functions compared to pasting from the text/XL2BB or entering the functions manually)
NTIMES
Excel Formula:
=LAMBDA(reference,[number],[blanks],[output_orientation],[exclude_types],[include_types],[replace_with],[if_empty],
LET(
r,IF(
LEN(TRIM(reference))>0,
reference,
""
),
n,PLSN(number),
b,PLSL(blanks),
o,PLSL(output_orientation),
x,XTYPE(reference,3),
j,JAS(
r,
JAR(reference,b),
x,
b
),
v,INDEX(j,3)=n,
k,FILTER(INDEX(j,1),v),
l,JAI(
SWITCH(JAL(exclude_types,include_types,replace_with),
0,k,
1,JAC(
exclude_types,
include_types,
replace_with,
k,
FILTER(INDEX(j,4),v))
),
if_empty
),
IF(o,TRANSPOSE(l),l)
)
)
JAR (counting core of NTIMES)
Excel Formula:
=LAMBDA(reference,blanks,
LET(
r,reference,
c,LEN(TRIM(r)),
IF(
ISERROR(r),
LET(
x,ERROR.TYPE(r),
MAP(x,LAMBDA(a,ST1F0(x=a)))
),
IF(
c>0,
IF(
r=FALSE,
MAP(r,LAMBDA(a,ST1F0(TEXT(r,10)="FALSE"))),
MAP(r,LAMBDA(a,ST1F0(r=a)))
),
IF(
blanks,
LET(
x,IF(
c=0,
IF(
ISBLANK(r),
31,
IF(
ISFORMULA(r),
32,
IF(LEN(r)>0,33,34))
),
""
),
MAP(x,LAMBDA(a,ST1F0(a=x)))
),
LET(
x,IF(c=0,1,0),
MAP(x,LAMBDA(a,ST1F0(a=x)))
)
)
)
)
)
)
JAS (filter core for NTIMES)
Excel Formula:
=LAMBDA(reference,counts,types,blanks,
LET(
r,reference,
c,SEQUENCE(,ROWS(r)*COLUMNS(r)),
i,TOROW(r),
j,TOROW(counts),
z,TOROW(types),
t,{31,32,33,34},
k,JAI(
UNIQUE(
FILTER(
i,
ISERROR(MATCH(z,t,0))
),
1
),
0
),
p,IFERROR(
MATCH(
IFERROR(k,ERROR.TYPE(k)),
IFERROR(i,ERROR.TYPE(i)),
0
),
0
),
a,IF(
blanks,
HSTACK(
IFERROR(
UNIQUE(
FILTER(
i,
NOT(ISERROR(MATCH(z,{31},0)))
),
1
),
0
),
IFERROR(
UNIQUE(
FILTER(
i,
NOT(ISERROR(MATCH(z,{32},0)))
),
1
),
0
),
IFERROR(
UNIQUE(
FILTER(
i,
NOT(ISERROR(MATCH(z,{33},0)))
),
1
),
0
),
IFERROR(
UNIQUE(
FILTER(
i,
NOT(ISERROR(MATCH(z,{34},0)))
),
1
),
0
)
),
IFERROR(
UNIQUE(
FILTER(
i,
NOT(ISERROR(MATCH(z,t,0)))
),
1
),
0
)
),
y,HSTACK(k,a),
u,HSTACK(
p,
LET(
x,IFERROR(MATCH(t,z,0),0),
IF(
blanks,
x,
SMALL(IF(x>0,x),1)
)
)
),
q,MATCH(u,c,0),
v,INDEX(j,1,q),
w,LET(
x,INDEX(z,1,q),
IF(
blanks,
x,
IF(
ISERROR(MATCH(x,t,0)),
x,
3
)
)
),
SORT(
CHOOSECOLS(
VSTACK(y,u,v,w),
FILTER(
SEQUENCE(,COLUMNS(u)),
u>0
)
),
2,
1,
1
)
)
)
XERROR.TYPE (posted separately)
XTYPE (posted separately)
AllTypes
Excel Formula:
={1,2,3,4,16,31,32,33,34,41,42,161,162,163,164,165,166,167,168,169,1610,1611,1612,1613,1614,1619}
IO (shortened form of ISOMITTED)
Excel Formula:
=LAMBDA(parameter,
ISOMITTED(parameter)
)
NIO [shortened form of NOT(ISOMITTED)]
Excel Formula:
=LAMBDA(parameter,
NOT(ISOMITTED(parameter))
)
PLS (stands for "parameter limit, single")
(Returns the parameter if it is a single entry (not blank or error) and #N/A otherwise)
(Causes the function to crash to a single #N/A if the incorrect parameter is entered [either the wrong type or more than a single entry in array brackets "{}"])
Excel Formula:
=LAMBDA(parameter,
INDEX(
IF(
OR(JAN(parameter),JAO(parameter),JAP(parameter)),
NA(),
parameter
),
1
)
)
PLSL (stands for "parameter limit, single logical")
(Returns 1 if the parameter is a single TRUE entry; 0 if the parameter is a single FALSE entry or is omitted; and #N/A otherwise)
(Causes the function to crash to a single #N/A if incorrect parameters are entered [either anything not logically evaluable or more than a single entry in array brackets "{}"]))
Excel Formula:
=LAMBDA([parameter],
IF(
IO(parameter),
0,
IF(
JAN(parameter),
NA(),
LET(
p,INDEX(parameter,1),
IF(
ISERROR(p),
NA(),
T1F0(p)
)
)
)
)
)
PLSN (stands for "parameter limit, single natural")
(Returns the parameter if it is a single natural number and #N/A otherwise)
(Causes the function to crash to a single #N/A if incorrect parameters are entered)
Excel Formula:
=LAMBDA(parameter,
INDEX(
IF(
OR(JAN(parameter),JAO(parameter),JAP(parameter)),
NA(),
IF(
ISNUMBER(parameter),
IF(
OR(MOD(parameter,1),parameter=0),
NA(),
parameter
),
NA()
)
),
1
)
)
PO0 (Returns 0 if the parameter is omitted and the parameter itself otherwise)
Excel Formula:
=LAMBDA([parameter],
IF(IO(parameter),0,parameter)
)
T1F0 (Returns 1 if the reference is TRUE, 0 if the reference is FALSE, and #N/A otherwise)
Excel Formula:
=LAMBDA(expression,
IF(
ISNUMBER(expression)+ISLOGICAL(expression),
IF(expression,1,0),
NA()
)
)
ST1F0 [Returns the sum of all TRUE (1) and FALSE (0) elements of the reference (counting all elements that cannot be logically evaluated as 0)]
Excel Formula:
=LAMBDA(reference,
SUM(T1F0(IFERROR(reference,0)))
)
JAB (returns a number greater than or equal to 1 (i.e. TRUE) if the reference has the specified data type(s) and 0 (i.e. FALSE) otherwise)
Excel Formula:
=LAMBDA(types,advanced_types_array,
IF(
SUM(T1F0(ISERROR(MATCH(types,AllTypes,0)))),
NA(),
LET(
basic_types_array,SWITCH(advanced_types_array,1,1,2,2,31,3,32,3,33,3,34,3,41,4,42,4,"","",16),
MAP(
advanced_types_array,
LAMBDA(a,OR(a=types))
)+
MAP(
basic_types_array,
LAMBDA(a,OR(a=types))
)
)
)
)
JAC (module for 1D (FILTER-based) "exclude_types/include_types/replace_with" with auto-shrink)
Excel Formula:
=LAMBDA(exclude_types,include_types,replace_with,main_array,advanced_types_array,
LET(
d,IF(IO(include_types),exclude_types,include_types),
x,JAB(d,advanced_types_array),
IF(
IO(replace_with),
FILTER(
main_array,
IF(IO(include_types),NOT(x),x)
),
IF(
IO(include_types),
IF(x,replace_with,main_array),
IF(x,main_array,replace_with)
)
)
)
)
JAI (module for "if_empty")
Excel Formula:
=LAMBDA(operation,if_empty,
IF(
JAN(if_empty),
NA(),
LET(
e,IF(
ISERROR(operation),
IF(ERROR.TYPE(operation)=14,1,0),
0
),
f,IF(
ISERROR(ROWS(operation)*COLUMNS(operation)),
1,
0
),
IF(
e+f=2,
IF(IO(if_empty),operation,if_empty),
operation
)
)
)
)
JAL (switch for "include_types/exclude_types")
Excel Formula:
=LAMBDA(exclude_types,include_types,replace_with,
IF(
JAN(replace_with),
NA(),
IFS(
AND(IO(exclude_types),IO(include_types),IO(replace_with)),0,
OR(AND(IO(include_types),NIO(exclude_types)),AND(NIO(include_types),IO(exclude_types))),1
)
)
)
JAN Returns TRUE if the reference is an array (i.e. is not a single element or is not omitted) and FALSE otherwise [simplified form of ISARRAY])
Excel Formula:
=LAMBDA([reference],
LET(
r,IFERROR(IF(reference="","",reference),""),
IF(
IO(reference),
FALSE,
IF(ROWS(r)*COLUMNS(r)>1,TRUE,FALSE)
)
)
)
JAO (Returns TRUE if the reference contains at least one error and FALSE otherwise [simplified form of ISERRORS])
Excel Formula:
=LAMBDA(reference,
IF(
IO(reference),
FALSE,
IF(SUM(IF(ISERROR(reference),1,0)),TRUE,FALSE)
)
)
JAP (Returns TRUE if the reference contains at least one blank and FALSE otherwise [simplified form of ISBLANKS])
Excel Formula:
=LAMBDA(reference,
IF(
IO(reference),
NA(),
IF(SUM(IF(IFERROR(reference,0)="",1,0)),TRUE,FALSE)
)
)
NTIMES.xlsx | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | |||
1 | |||||||||||||||||||||
2 | #CALC! | basic types | |||||||||||||||||||
3 | types | (advanced) | XTYPE(C4:H7,3) | 1 | dt:NUMBER | ||||||||||||||||
4 | 23 | book | TRUE | #DIV/0! | note | 1 | 2 | 41 | 162 | 31 | 2 | 2 | dt:TEXT | ||||||||
5 | FALSE | 56.8 | 23 | #N/A | 42 | 33 | 1 | 32 | 1 | 167 | 3 | dt:BLANK | |||||||||
6 | 107 | book | TRUE | 7.5 | 34 | 1 | 31 | 2 | 41 | 1 | 4 | dt:LOGICAL | |||||||||
7 | #VALUE! | 100 | book | #DIV/0! | 163 | 31 | 1 | 33 | 2 | 162 | 16 | dt:ERROR | |||||||||
8 | |||||||||||||||||||||
9 | counts | JAR(C4:H7,0) | types | (basic) | XTYPE(C4:H7,2) | advanced types | |||||||||||||||
10 | blank types having the same value | 2 | 3 | 2 | 2 | 7 | 1 | 1 | 2 | 4 | 16 | 3 | 2 | 1 | dt:NUMBER | ||||||
11 | 1 | 7 | 1 | 7 | 2 | 1 | 4 | 3 | 1 | 3 | 1 | 16 | 2 | dt:TEXT | |||||||
12 | 7 | 1 | 7 | 3 | 2 | 1 | 3 | 1 | 3 | 2 | 4 | 1 | 31 | dt:BLANK_REAL | |||||||
13 | 1 | 7 | 1 | 7 | 3 | 2 | 16 | 3 | 1 | 3 | 2 | 16 | 32 | dt:BLANK_FORMULA | |||||||
14 | 33 | dt:BLANK_SPACE | |||||||||||||||||||
15 | counts | JAR(C4:H7,1) | 34 | dt:BLANK_PASTED | |||||||||||||||||
16 | distinct blank types | 2 | 3 | 2 | 2 | 3 | 1 | 41 | dt:LOGICAL_TRUE | ||||||||||||
17 | 1 | 2 | 1 | 1 | 2 | 1 | 42 | dt:LOGICAL_FALSE | |||||||||||||
18 | 1 | 1 | 3 | 3 | 2 | 1 | 161 | dt:ERROR_NULL! | |||||||||||||
19 | 1 | 3 | 1 | 2 | 3 | 2 | 162 | dt:ERROR_DIV/0! | |||||||||||||
20 | 163 | dt:ERROR_VALUE! | |||||||||||||||||||
21 | 164 | dt:ERROR_REF! | |||||||||||||||||||
22 | number | blanks | output | 165 | dt:ERROR_NAME? | ||||||||||||||||
23 | 1 | omitted | note | FALSE | 56.8 | #N/A | 107 | 7.5 | #VALUE! | 100 | 166 | dt:ERROR_NUM! | |||||||||
24 | 1 | 0 | note | FALSE | 56.8 | #N/A | 107 | 7.5 | #VALUE! | 100 | 167 | dt:ERROR_N/A | |||||||||
25 | 1 | 1 | note | FALSE | 56.8 | #N/A | 107 | 7.5 | #VALUE! | 100 | 168 | dt:ERROR_GETTING_DATA | |||||||||
26 | 2 | omitted | 23 | TRUE | #DIV/0! | 169 | dt:ERROR_SPILL! | ||||||||||||||
27 | 2 | 0 | 23 | TRUE | #DIV/0! | 1610 | dt:ERROR_CONNECT! | ||||||||||||||
28 | 2 | 1 | 23 | TRUE | #DIV/0! | 1611 | dt:ERROR_BLOCKED! | ||||||||||||||
29 | 3 | omitted | book | 1612 | dt:ERROR_UNKNOWN! | ||||||||||||||||
30 | 3 | 0 | book | 1613 | dt:ERROR_FIELD! | ||||||||||||||||
31 | 3 | 1 | book | 1614 | dt:ERROR_CALC! | ||||||||||||||||
32 | 4 | omitted | #CALC! | 1619 | dt:ERROR_PYTHON! | ||||||||||||||||
33 | 4 | 0 | #CALC! | ||||||||||||||||||
34 | 4 | 1 | #CALC! | ||||||||||||||||||
35 | 5 | omitted | #CALC! | ||||||||||||||||||
36 | 5 | 0 | #CALC! | ||||||||||||||||||
37 | 5 | 1 | #CALC! | ||||||||||||||||||
38 | 6 | omitted | #CALC! | ||||||||||||||||||
39 | 6 | 0 | #CALC! | ||||||||||||||||||
40 | 6 | 1 | #CALC! | ||||||||||||||||||
41 | 7 | omitted | |||||||||||||||||||
42 | 7 | 0 | |||||||||||||||||||
43 | 7 | 1 | #CALC! | ||||||||||||||||||
44 | |||||||||||||||||||||
45 | number | blanks | exclude_types | include_types | replace_with | output | |||||||||||||||
46 | 1 | 0 | 1 | omitted | omitted | note | FALSE | #N/A | #VALUE! | ||||||||||||
47 | 1 | 1 | 2 | omitted | omitted | FALSE | 56.8 | #N/A | 107 | 7.5 | #VALUE! | 100 | |||||||||
48 | 1 | 0 | 4 | omitted | omitted | note | 56.8 | #N/A | 107 | 7.5 | #VALUE! | 100 | |||||||||
49 | 1 | 1 | 16 | omitted | omitted | note | FALSE | 56.8 | 107 | 7.5 | 100 | ||||||||||
50 | 1 | 0 | 41 | omitted | omitted | note | FALSE | 56.8 | #N/A | 107 | 7.5 | #VALUE! | 100 | ||||||||
51 | 1 | 1 | 42 | omitted | omitted | note | 56.8 | #N/A | 107 | 7.5 | #VALUE! | 100 | |||||||||
52 | 1 | 0 | 162 | omitted | omitted | note | FALSE | 56.8 | #N/A | 107 | 7.5 | #VALUE! | 100 | ||||||||
53 | 1 | 1 | 163 | omitted | omitted | note | FALSE | 56.8 | #N/A | 107 | 7.5 | 100 | |||||||||
54 | 1 | 0 | 167 | omitted | omitted | note | FALSE | 56.8 | 107 | 7.5 | #VALUE! | 100 | |||||||||
55 | 1 | 1 | 168 | omitted | omitted | note | FALSE | 56.8 | #N/A | 107 | 7.5 | #VALUE! | 100 | ||||||||
56 | 1 | 0 | 3 | omitted | omitted | note | FALSE | 56.8 | #N/A | 107 | 7.5 | #VALUE! | 100 | ||||||||
57 | 1 | 1 | 3 | omitted | omitted | note | FALSE | 56.8 | #N/A | 107 | 7.5 | #VALUE! | 100 | ||||||||
58 | 1 | 0 | 31 | omitted | omitted | note | FALSE | 56.8 | #N/A | 107 | 7.5 | #VALUE! | 100 | ||||||||
59 | 1 | 1 | 31 | omitted | omitted | note | FALSE | 56.8 | #N/A | 107 | 7.5 | #VALUE! | 100 | ||||||||
60 | 1 | 0 | 32 | omitted | omitted | note | FALSE | 56.8 | #N/A | 107 | 7.5 | #VALUE! | 100 | ||||||||
61 | 1 | 1 | 32 | omitted | omitted | note | FALSE | 56.8 | #N/A | 107 | 7.5 | #VALUE! | 100 | ||||||||
62 | 1 | 0 | 33 | omitted | omitted | note | FALSE | 56.8 | #N/A | 107 | 7.5 | #VALUE! | 100 | ||||||||
63 | 1 | 1 | 33 | omitted | omitted | note | FALSE | 56.8 | #N/A | 107 | 7.5 | #VALUE! | 100 | ||||||||
64 | 1 | 0 | 34 | omitted | omitted | note | FALSE | 56.8 | #N/A | 107 | 7.5 | #VALUE! | 100 | ||||||||
65 | 1 | 1 | 34 | omitted | omitted | note | FALSE | 56.8 | #N/A | 107 | 7.5 | #VALUE! | 100 | ||||||||
66 | |||||||||||||||||||||
67 | number | blanks | exclude_types | include_types | replace_with | output | |||||||||||||||
68 | 1 | 0 | omitted | 1 | omitted | 56.8 | 107 | 7.5 | 100 | ||||||||||||
69 | 1 | 1 | omitted | 2 | omitted | note | |||||||||||||||
70 | 1 | 0 | omitted | 4 | omitted | FALSE | |||||||||||||||
71 | 1 | 1 | omitted | 16 | omitted | #N/A | #VALUE! | ||||||||||||||
72 | 1 | 0 | omitted | 41 | omitted | #CALC! | |||||||||||||||
73 | 1 | 1 | omitted | 42 | omitted | FALSE | |||||||||||||||
74 | 1 | 0 | omitted | 162 | omitted | #CALC! | |||||||||||||||
75 | 1 | 1 | omitted | 163 | omitted | #VALUE! | |||||||||||||||
76 | 1 | 0 | omitted | 167 | omitted | #N/A | |||||||||||||||
77 | 1 | 1 | omitted | 168 | omitted | #CALC! | |||||||||||||||
78 | 1 | 0 | omitted | 3 | omitted | #CALC! | |||||||||||||||
79 | 1 | 1 | omitted | 3 | omitted | ||||||||||||||||
80 | 1 | 0 | omitted | 31 | omitted | #CALC! | |||||||||||||||
81 | 1 | 1 | omitted | 31 | omitted | #CALC! | |||||||||||||||
82 | 1 | 0 | omitted | 32 | omitted | #CALC! | |||||||||||||||
83 | 1 | 1 | omitted | 32 | omitted | ||||||||||||||||
84 | 1 | 0 | omitted | 33 | omitted | #CALC! | |||||||||||||||
85 | 1 | 1 | omitted | 33 | omitted | #CALC! | |||||||||||||||
86 | 1 | 0 | omitted | 34 | omitted | #CALC! | |||||||||||||||
87 | 1 | 1 | omitted | 34 | omitted | ||||||||||||||||
88 | |||||||||||||||||||||
89 | number | blanks | exclude_types | include_types | replace_with | output | |||||||||||||||
90 | 1 | 0 | omitted | 1 | REPLACED | REPLACED | REPLACED | 56.8 | REPLACED | 107 | 7.5 | REPLACED | 100 | ||||||||
91 | 2 | 1 | 2 | omitted | REPLACED | 23 | TRUE | #DIV/0! | |||||||||||||
92 | 1 | 0 | omitted | 4 | REPLACED | REPLACED | FALSE | REPLACED | REPLACED | REPLACED | REPLACED | REPLACED | REPLACED | ||||||||
93 | 3 | 1 | 16 | omitted | REPLACED | book | |||||||||||||||
94 | 1 | 0 | omitted | 41 | REPLACED | REPLACED | REPLACED | REPLACED | REPLACED | REPLACED | REPLACED | REPLACED | REPLACED | ||||||||
95 | 2 | 1 | 42 | omitted | REPLACED | 23 | TRUE | #DIV/0! | |||||||||||||
96 | 1 | 0 | omitted | 162 | REPLACED | REPLACED | REPLACED | REPLACED | REPLACED | REPLACED | REPLACED | REPLACED | REPLACED | ||||||||
97 | 3 | 1 | 163 | omitted | REPLACED | book | |||||||||||||||
98 | 1 | 0 | omitted | 167 | REPLACED | REPLACED | REPLACED | REPLACED | #N/A | REPLACED | REPLACED | REPLACED | REPLACED | ||||||||
99 | 2 | 1 | 168 | omitted | REPLACED | 23 | TRUE | #DIV/0! | |||||||||||||
100 | 1 | 0 | omitted | 3 | REPLACED | REPLACED | REPLACED | REPLACED | REPLACED | REPLACED | REPLACED | REPLACED | REPLACED | ||||||||
101 | 3 | 1 | 3 | omitted | REPLACED | book | REPLACED | ||||||||||||||
102 | 1 | 0 | omitted | 31 | REPLACED | REPLACED | REPLACED | REPLACED | REPLACED | REPLACED | REPLACED | REPLACED | REPLACED | ||||||||
103 | 2 | 1 | 31 | omitted | REPLACED | 23 | TRUE | #DIV/0! | |||||||||||||
104 | 1 | 0 | omitted | 32 | REPLACED | REPLACED | REPLACED | REPLACED | REPLACED | REPLACED | REPLACED | REPLACED | REPLACED | ||||||||
105 | 3 | 1 | 32 | omitted | REPLACED | book | |||||||||||||||
106 | 1 | 0 | omitted | 33 | REPLACED | REPLACED | REPLACED | REPLACED | REPLACED | REPLACED | REPLACED | REPLACED | REPLACED | ||||||||
107 | 2 | 1 | 33 | omitted | REPLACED | 23 | TRUE | #DIV/0! | REPLACED | ||||||||||||
108 | 1 | 0 | omitted | 34 | REPLACED | REPLACED | REPLACED | REPLACED | REPLACED | REPLACED | REPLACED | REPLACED | REPLACED | ||||||||
109 | 3 | 1 | 34 | omitted | REPLACED | book | |||||||||||||||
110 | |||||||||||||||||||||
NTIMES |
Cell Formulas | ||
---|---|---|
Range | Formula | |
B1,F5 | B1 | =IF(1,"") |
C2 | C2 | =LAMBDA(reference,[number],[blanks],[output_orientation],[exclude_types],[include_types],[replace_with],[if_empty],LET(r,IF(LEN(TRIM(reference))>0,reference,""),n,PLSN(number),b,PLSL(blanks),o,PLSL(output_orientation),x,XTYPE(reference,3),j,SORT(JAS(r,JAR(reference,b),x,b),2,1,1),v,INDEX(j,3)=n,k,FILTER(INDEX(j,1),v),l,JAI(SWITCH(JAL(exclude_types,include_types,replace_with),0,k,1,JAC(exclude_types,include_types,replace_with,k,FILTER(INDEX(j,4),v))),if_empty),IF(o,TRANSPOSE(l),l))) |
J4:O7 | J4 | =XTYPE(C4:H7,3) |
F4,H7 | F4 | =1/0 |
H5 | H5 | =#N/A |
C10:H13 | C10 | =JAR(C4:H7,0) |
J10:O13 | J10 | =XTYPE(C4:H7,2) |
C16:H19 | C16 | =JAR(C4:H7,1) |
D23:K23 | D23 | =NTIMES($C$4:$H$7,1) |
D24:K24 | D24 | =NTIMES($C$4:$H$7,1,0) |
D25:M25 | D25 | =NTIMES($C$4:$H$7,1,1) |
D26:F26 | D26 | =NTIMES($C$4:$H$7,2) |
D27:F27 | D27 | =NTIMES($C$4:$H$7,2,0) |
D28:G28 | D28 | =NTIMES($C$4:$H$7,2,2) |
D29 | D29 | =NTIMES($C$4:$H$7,3) |
D30 | D30 | =NTIMES($C$4:$H$7,3,0) |
D31:E31 | D31 | =NTIMES($C$4:$H$7,3,3) |
D32 | D32 | =NTIMES($C$4:$H$7,4) |
D33 | D33 | =NTIMES($C$4:$H$7,4,0) |
D34 | D34 | =NTIMES($C$4:$H$7,4,4) |
D35 | D35 | =NTIMES($C$4:$H$7,5) |
D36 | D36 | =NTIMES($C$4:$H$7,5,0) |
D37 | D37 | =NTIMES($C$4:$H$7,5,5) |
D38 | D38 | =NTIMES($C$4:$H$7,6) |
D39 | D39 | =NTIMES($C$4:$H$7,6,0) |
D40 | D40 | =NTIMES($C$4:$H$7,6,6) |
D41 | D41 | =NTIMES($C$4:$H$7,7) |
D42 | D42 | =NTIMES($C$4:$H$7,7,0) |
D43 | D43 | =NTIMES($C$4:$H$7,7,7) |
G46:J46 | G46 | =NTIMES($C$4:$H$7,1,0,,1) |
G47:O47 | G47 | =NTIMES($C$4:$H$7,1,1,,2) |
G48:M48 | G48 | =NTIMES($C$4:$H$7,1,0,,4) |
G49:N49 | G49 | =NTIMES($C$4:$H$7,1,1,,16) |
G50:N50 | G50 | =NTIMES($C$4:$H$7,1,0,,41) |
G51:O51 | G51 | =NTIMES($C$4:$H$7,1,1,,42) |
G52:N52 | G52 | =NTIMES($C$4:$H$7,1,0,,162) |
G53:O53 | G53 | =NTIMES($C$4:$H$7,1,1,,163) |
G54:M54 | G54 | =NTIMES($C$4:$H$7,1,0,,167) |
G55:P55 | G55 | =NTIMES($C$4:$H$7,1,1,,168) |
G56:N56 | G56 | =NTIMES($C$4:$H$7,1,0,,3) |
G57:N57 | G57 | =NTIMES($C$4:$H$7,1,1,,3) |
G58:N58 | G58 | =NTIMES($C$4:$H$7,1,0,,31) |
G59:P59 | G59 | =NTIMES($C$4:$H$7,1,1,,31) |
G60:N60 | G60 | =NTIMES($C$4:$H$7,1,0,,32) |
G61:O61 | G61 | =NTIMES($C$4:$H$7,1,1,,32) |
G62:N62 | G62 | =NTIMES($C$4:$H$7,1,0,,33) |
G63:P63 | G63 | =NTIMES($C$4:$H$7,1,1,,33) |
G64:N64 | G64 | =NTIMES($C$4:$H$7,1,0,,34) |
G65:O65 | G65 | =NTIMES($C$4:$H$7,1,1,,34) |
G68:J68 | G68 | =NTIMES($C$4:$H$7,1,0,,,1) |
G69 | G69 | =NTIMES($C$4:$H$7,1,1,,,2) |
G70 | G70 | =NTIMES($C$4:$H$7,1,0,,,4) |
G71:H71 | G71 | =NTIMES($C$4:$H$7,1,1,,,16) |
G72 | G72 | =NTIMES($C$4:$H$7,1,0,,,41) |
G73 | G73 | =NTIMES($C$4:$H$7,1,1,,,42) |
G74 | G74 | =NTIMES($C$4:$H$7,1,0,,,162) |
G75 | G75 | =NTIMES($C$4:$H$7,1,1,,,163) |
G76 | G76 | =NTIMES($C$4:$H$7,1,0,,,167) |
G77 | G77 | =NTIMES($C$4:$H$7,1,1,,,168) |
G78 | G78 | =NTIMES($C$4:$H$7,1,0,,,3) |
G79:H79 | G79 | =NTIMES($C$4:$H$7,1,1,,,3) |
G80 | G80 | =NTIMES($C$4:$H$7,1,0,,,31) |
G81 | G81 | =NTIMES($C$4:$H$7,1,1,,,31) |
G82 | G82 | =NTIMES($C$4:$H$7,1,0,,,32) |
G83 | G83 | =NTIMES($C$4:$H$7,1,1,,,32) |
G84 | G84 | =NTIMES($C$4:$H$7,1,0,,,33) |
G85 | G85 | =NTIMES($C$4:$H$7,1,1,,,33) |
G86 | G86 | =NTIMES($C$4:$H$7,1,0,,,34) |
G87 | G87 | =NTIMES($C$4:$H$7,1,1,,,34) |
G90:N90 | G90 | =NTIMES($C$4:$H$7,1,0,,,1,"REPLACED") |
G91:J91 | G91 | =NTIMES($C$4:$H$7,2,1,,2,,"REPLACED") |
G92:N92 | G92 | =NTIMES($C$4:$H$7,1,0,,,4,"REPLACED") |
G93:H93 | G93 | =NTIMES($C$4:$H$7,3,1,,16,,"REPLACED") |
G94:N94 | G94 | =NTIMES($C$4:$H$7,1,0,,,41,"REPLACED") |
G95:J95 | G95 | =NTIMES($C$4:$H$7,2,1,,42,,"REPLACED") |
G96:N96 | G96 | =NTIMES($C$4:$H$7,1,0,,,162,"REPLACED") |
G97:H97 | G97 | =NTIMES($C$4:$H$7,3,1,,163,,"REPLACED") |
G98:N98 | G98 | =NTIMES($C$4:$H$7,1,0,,,167,"REPLACED") |
G99:J99 | G99 | =NTIMES($C$4:$H$7,2,1,,168,,"REPLACED") |
G100:N100 | G100 | =NTIMES($C$4:$H$7,1,0,,,3,"REPLACED") |
G101:H101 | G101 | =NTIMES($C$4:$H$7,3,1,,3,,"REPLACED") |
G102:N102 | G102 | =NTIMES($C$4:$H$7,1,0,,,31,"REPLACED") |
G103:J103 | G103 | =NTIMES($C$4:$H$7,2,1,,31,,"REPLACED") |
G104:N104 | G104 | =NTIMES($C$4:$H$7,1,0,,,32,"REPLACED") |
G105:H105 | G105 | =NTIMES($C$4:$H$7,3,1,,32,,"REPLACED") |
G106:N106 | G106 | =NTIMES($C$4:$H$7,1,0,,,33,"REPLACED") |
G107:J107 | G107 | =NTIMES($C$4:$H$7,2,1,,33,,"REPLACED") |
G108:N108 | G108 | =NTIMES($C$4:$H$7,1,0,,,34,"REPLACED") |
G109:H109 | G109 | =NTIMES($C$4:$H$7,3,1,,34,,"REPLACED") |
Dynamic array formulas. |
Upvote
0