Skip to main content
All CollectionsGoogle Sheet Export
How to get the data sorted in your Google Sheets export
How to get the data sorted in your Google Sheets export

This article covers how to automatically sort the data in your Google Sheets export

Robert Åman avatar
Written by Robert Åman
Updated over a year ago

Setting up sorting in Funnel

When setting up a scheduled Google Sheets Data Share you can select what column you want the data sorted on and in which direction.

If you have more advanced requirements for sorting your data see the next section about setting it up in Google Sheets instead.

Setting up sorting in Google Sheets

We will be using the following workbook as an example. 

  • Open up the Google Sheet to which your Funnel data gets exported. Unsure how to set up a Funnel export to Google Sheets? Take a look at this article: How to export data to google sheets

  • Create a second sheet in the workbook. We have in this example renamed the sheets so that you more easily can tell what is what, see picture below. 

  • Go to your newly created sheet and mark the upper left cell (A1). Add the function ='[name of your first sheet]'!1:1 and click 'Enter'. In this example the name of our first sheet is Raw data, which is why the function is written ='Raw data'!1:1 in the picture below. 

  • Grab the cell in its bottom right corner and drag it out sideways to populate the function to the whole row, in that way populating all column headers that you have present in your first sheet (Raw data) to your second sheet (Sorted data)

  • Next, mark cell A2 and add the function =SORT('[name of your first sheet]'!A2:X1000,1,true) and click 'Enter'. In this example, the function will be =SORT('Raw data'!A2:E1000,1,true)

  • The first part 'Raw data'!A2:X1000 refers to what sheet and range of cells that should be sorted. Note, that if you have more than 1000 rows in your sheet, or columns that span further than to column X, you will need to define a greater range than in the above example. 

  • The second part of the function indicates the index of the column in the defined range containing the values by which to sort. In this example we have added a 1 here, indicating that we want to sort the data after the first column in our defined range 'Raw data'!A2:X1000, in this case column A: Campaign. 

  • The last part of the function indicates whether you want to sort the values in ascending or descending order. TRUE sorts in ascending order, while FALSE sorts in descending order. There are in fact additional parameters that you can add to your sort function, although we won't include them here. For a full description of the sort function, follow this link.

  • By clicking 'Enter' the sheet should now contain sorted data! If you have scheduled an export to Google Sheets using Funnel's Google Sheets Upload your data will now always be sorted in the second sheet regardless of new rows that is included in the export (as long as you have defined a range great enough in your sort function).  

Did this answer your question?