Blog

Making Google Sheets look less like… Google Sheets

This is a guest post from Josh Cottrell-Schloemer.

Google Sheets is an incredibly powerful spreadsheet tool for pulling, processing, and presenting data. But many people don’t realize that you can also use it to build interactive dashboards.

With a bit of creativity we can go from this:

Dashboard Data Table in Google Sheets

To this:

Google Sheets Dashboard

The skills to build this type of dashboard aren’t difficult to learn and you can get started with a basic knowledge of Google Sheets.

Here’s a walkthrough of the dashboard shown above:


Continue reading Making Google Sheets look less like… Google Sheets

BYCOL Function in Google Sheets – LAMBDA Helper Function

The BYCOL function in Google Sheets operates on an array or range and returns a new row array, created by grouping each column to a single value.

Here’s a simple example, showing a table of exam scores:

Bycol Function In Google Sheets

The formula in A8 is:

=BYCOL(A2:D6,LAMBDA(c,AVERAGE(c)))

The easiest way to think about using BYCOL is to think “what function can I use on a single column?” and then think of BYCOL as just repeating that operation across multiple columns.

BYCOL passes the input array to a lambda function, which takes an input column, called “c”, and calculates the average value for that column. It loops over each column and returns a row array of average values, one for each column.

🔗 Get this example and others in the template at the bottom of this article.

Continue reading BYCOL Function in Google Sheets – LAMBDA Helper Function

BYROW Function in Google Sheets – LAMBDA Helper Function

The BYROW function in Google Sheets operates on an array or range and returns a new column array, created by grouping each row to a single value.

The value for each row is obtained by applying a lambda function on that row.

For example, this BYROW function calculates the average score of all three rows in the input array:

=BYROW(A2:D4,LAMBDA(row, AVERAGE(row)))

Which looks like this in our Google Sheet:

byrow Function In Google Sheets

(Of course, you could use three separate AVERAGE functions to perform this calculation.)

But the important thing here is how the BYROW operates. It’s much more like programming.

We pass an array of data to the BYROW function.

It then passes each row into a lamba function to calculate a single value for that row (the average in this example). The BYROW formula returns these values in a column array, with the same number of rows as the original input array.

🔗 Get this example and others in the template at the bottom of this article.

Continue reading BYROW Function in Google Sheets – LAMBDA Helper Function

MAKEARRAY Function in Google Sheets – LAMBDA Helper Function

The MAKEARRAY function in Google Sheets generates an array of a specified size, with each value calculated by a custom lambda function.

The Lamba function has access to the row and column indices for each value.

Let’s see a simple example:

=MAKEARRAY(5,3,LAMBDA(row, col, row + col))

This generates an array with 5 rows and 3 columns.

The value of each element in the row is the sum of the row position and the column position, within the array.

So the first value is 2 (row 1 + column 1) and the final value is 8 (row 5 + column 3). The indices are in relation to the position within the array, not the position within the Google Sheet.

Makearray Function Simple Example

🔗 Get this example and others in the template at the bottom of this article.

Continue reading MAKEARRAY Function in Google Sheets – LAMBDA Helper Function

SCAN Function in Google Sheets – LAMBDA Helper Function

The SCAN function in Google Sheets scans an array and applies a LAMBDA function to each value, moving row by row. The output is an array of intermediate values obtained at each step.

It’s hard to understand without seeing an example, so let’s do that.

The most straightforward SCAN formula is to create a running total calculation on a column of numbers.

The formula is:

=SCAN(0,A2:A11,LAMBDA(runningTotal,currentValue,runningTotal + currentValue))

Which produces this array output:

Scan Function Running Total Calculation

The lambda simply adds together the current running total and the new value, then returns the answer to the output array.

When all of the values from the input array have been considered, the output array is returned.

🔗 Get this example and others in the template at the bottom of this article.

Continue reading SCAN Function in Google Sheets – LAMBDA Helper Function