Reverse the order of a range of values from a Google Sheet

As part of a scenario I have set up, I have a module to get range values from a Google Sheet. I need to add a module to reverse the order of the range values. It’s not an option to change the order in the actual Google Sheet, so I’m hoping there’s a way to do this as part of the scenario before pushing that data to another module in the sequence. Anyone know how to do this?

hi Lauren
nice to meet you
you can use the “Array Aggregator” module to collect the values, followed by the ‘Iterator’ module to process each item in reverse order

One option is to use the sort founction to sort the array and then reinsert it into the Google Sheet.

https://www.make.com/en/help/functions/array-functions#sort--array---order----key--

L

Would you be able to share details about which module you’d use to do this how it would be configued? I’m probably showing my lack of skills here… :grimacing:

You should be able to do something as simple as

{{ sort(dataAray;desc ci; arrayItemName) }}

in a Set Variable(s) module. (“Desc ci” means descending, case insensitive; you can see other acceptable values in the documentation.)

Then you put that Array in the Google Sheets Bulk Row Update (Or Bulk Add Rows) module and it will update the sheet appropriately.

L