CONSTANTARRAY

=CONSTANTARRAY(NrRows,NrCols,ScalarValue)

NrRows
Optional. The Number of Rows in the resulting Array. Default = 1.
NrCols
Optional. The Number of Columns in the resulting Array. Default = 1.
ScalarValue
Optional. The constant value in the Array. The Default value is 1.

Create an array of the specified dimensions where all cells have the specified constant value.

GeertD

Board Regular
Joined
Dec 22, 2020
Messages
60
Office Version
  1. 365
Platform
  1. Windows
CONSTANTARRAY: Create an array of the specified dimensions where all cells have the specified constant value.
N.B.: If you want to create a unit matrix instead, use the standard Excel function: MUNIT(n).
Excel Formula:
=LAMBDA(a,b,val,SEQUENCE(a,b,val,0))
DXLR's LAMBDA.LET Library_v00.07.xlsb
ABCD
13.143.143.14
23.143.143.14
33.143.143.14
4
Sandbox_Mr.Excel
Cell Formulas
RangeFormula
A1:C3A1=ConstantArray(3,3,3.14)
Dynamic array formulas.
 
Upvote 0

Forum statistics

Threads
1,216,089
Messages
6,128,750
Members
449,466
Latest member
Peter Juhnke

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