When exporting data to Google Sheets, the data will not get sorted by default. A solution however is to let Google Sheets sort the data in a second sheet inside your workbook. This solution requires you to add a sort function to one of your sheets, but means that data will be automatically sorted even if new columns or rows are added to your Funnel export in the future. Next follows a guide how to set this up. 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).