Home > OS >  Google Sheets - Script to add dynamic borders until last non-empty row of range
Google Sheets - Script to add dynamic borders until last non-empty row of range

Time:10-04

I have a google sheet that shows a user's ranking in a competition that runs each week. As users enter the competition, a new row of data is added to the 'Weekly Leaderboard' C9:E20 range.

I am trying to create a google sheets script to add left/right/vertical borders to data within the C9:E20 range until the last row of data.

The last row of data will have left/right/vertical/bottom borders to close up the table.

Sample: enter image description here

Note:

  • This script is run by OnEdit trigger. So, when you directly run this script, an error occurs. When you use this script, please edit the cells "C9:E20" of "Weekly Leaderboard" sheet. By this, the script is run. Please be careful about this.

Reference:

  • Related