David542
David542

Reputation: 110093

Adding onto an array in Excel/Google Sheets

Let's say I have a 2x2 array in Excel/Google Sheets:

={1,2;3,4}

To add on additional rows to this array -- for example, to make it 4x2, I can use ;:

enter image description here

However, how could additional columns be added on, for example, to make the array 2x4, something like:

enter image description here

Upvotes: 1

Views: 76

Answers (2)

marikamitsos
marikamitsos

Reputation: 10573

In Google Sheets you can use the following 2 formulas

=SEQUENCE(4,2)

={SEQUENCE(2,2),SEQUENCE(2,2,5)}

enter image description here

Functions used:

Upvotes: 1

David542
David542

Reputation: 110093

Arrays allow nesting in Google Sheets so you can try something like:

={B5:C6, {5,6;7,8}}

enter image description here

Upvotes: 3

Related Questions