https://github.com/jrdnbradford/google-sheet-color-sort
Google Sheet-bound script that assists with sorting Google Sheet rows by background fill color
https://github.com/jrdnbradford/google-sheet-color-sort
data excel google-apps google-apps-script google-sheet google-sheets javascript microsoft-excel sort-rows
Last synced: 2 months ago
JSON representation
Google Sheet-bound script that assists with sorting Google Sheet rows by background fill color
- Host: GitHub
- URL: https://github.com/jrdnbradford/google-sheet-color-sort
- Owner: jrdnbradford
- License: mit
- Archived: true
- Created: 2020-04-21T21:40:40.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2020-07-02T20:01:31.000Z (almost 5 years ago)
- Last Synced: 2025-02-20T01:24:48.613Z (4 months ago)
- Topics: data, excel, google-apps, google-apps-script, google-sheet, google-sheets, javascript, microsoft-excel, sort-rows
- Language: JavaScript
- Size: 7.81 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Google-Sheet-Color-Sort
Google Sheet-bound script that assists with sorting Google Sheet rows by selected column's background fill color.Note: Google recently added the ability to sort Sheets by background fill color. See their [help article](https://support.google.com/docs/answer/3540681) for details.
## Usage
### Add the Script to your Google Sheet
In your Google Sheet select **Tools** -> **Script editor**. Remove the default code, paste in the contents of this [script](googleSheetColorSort.gs), save, and enter a project title of your choice. Close the script editor and go back to your Sheet.### Authorize the Application
Refresh the Sheet, click **Google Sheet Color Sort** in the menu bar, and click any of the submenu items. Then authorize the application using your Google account (this must only be done once). Once authorized you must click **Google Sheet Color Sort** again to see your sorting options.### Select a Sorting Column
Select a column that contains the background fill colors you wish to sort on by clicking and highlighting any cell within that column.### Choose a Sorting Method
Once you have highlighted a cell within your column of choice, use the **Google Sheet Color Sort** menu button to select a sorting option.#### Sort Rows by Color
Use the **Sort Rows by Color** submenu item to automatically sort the entire Google Sheet by each row's background fill color in your selected column.#### Add Sorting Column
Use the **Add Sorting Column** submenu item to add a column that contains each row's background fill color as a hexadecimal color code that can be used to manually sort sections of the Google Sheet by selecting the relevant rows, going to **Data** -> **Sort Range**, and selecting the column with the values.After selecting a submenu item, specify whether the data in your Sheet has a header row in the window that appears.
## Recommended OAuth Scope
```json
{
"oauthScopes": [
"https://www.googleapis.com/auth/spreadsheets.currentonly"
]
}
```## Authors
**Jordan Bradford** - GitHub: [jrdnbradford](https://github.com/jrdnbradford)## License
This script is licensed under the MIT license. See [LICENSE.txt](LICENSE.txt) for details.