I'm importing data into Google Sheets and then adding static information to it. I'd like my static data to be kept in alignment with a dynamic - is this possible? Is a script still required? Does anyone have an example?

## 3 Answers

0

On

0

On

this script could perhaps help:

`var ss = SpreadsheetApp.getActiveSpreadsheet(); var sheet = ss.getSheetByName("Sheet1"); var range = sheet.getRange("A1:Z");`

function onEdit(e) { range.sort([{column: 2, ascending: false}]); }

`Sheet1`

= name of the sheet`A1:Z`

= range to be sorted`column: 2`

= column B`ascending: false`

= descending

it depends on your data structure, but there is a way with

formula`VLOOKUP`

https://exceljet.net/excel-functions/excel-vlookup-function