Тёмный

How to Auto Highlight Active Cell Row and Column in Google Sheets 

Spreadsheet Power
Подписаться 9 тыс.
Просмотров 20 тыс.
50% 1

Learn auto highlighting selected cell's row and column in google sheets. This we do by using app script feature of Google Sheets.
Copy the code from below.
function onSelectionChange()
{
var range = SpreadsheetApp.getActiveRange();
var sheet = range.getSheet();
var rows = sheet.getMaxRows();
var columns = sheet.getMaxColumns();
sheet.getRange(1,1,rows,columns).setBackground(null);
sheet.getRange(1,range.getColumn(),rows,range.getNumColumns()).setBackground("yellow");
sheet.getRange(range.getRow(),1,range.getNumRows(),columns).setBackground("yellow");
}

Наука

Опубликовано:

 

27 апр 2023

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 20   
@Countdracula6
@Countdracula6 Год назад
Thank you for sharing!
@spreadsheet_power
@spreadsheet_power Год назад
Wc🙏
@teet-traveleatentertainmenttec
@teet-traveleatentertainmenttec 4 месяца назад
Thanks Bro.
@spreadsheet_power
@spreadsheet_power 4 месяца назад
Welcome 🙏
@user-mx5ql9wj2x
@user-mx5ql9wj2x 4 месяца назад
thank you Dear From Pakistan
@spreadsheet_power
@spreadsheet_power 4 месяца назад
Welcome
@user-xj5uj6pi5b
@user-xj5uj6pi5b Год назад
Thank you that was a great video and I've already been able to implement it. Quick question - if my spreadsheet has colour through it, how can I implement this code so it doesn't set the default colour back to white each click? I tried taking '.setBackground(null)' out, but then the sheet doesn't update on each click, it leaves the cross sections there.
@spreadsheet_power
@spreadsheet_power Год назад
Hi, I have not tried this yet, I will let you know if any solution found.
@user-xj5uj6pi5b
@user-xj5uj6pi5b Год назад
@@spreadsheet_power thanks that would be invaluable! 😊 Might be tricky - I tried asking Bard and no alternate version of script it gave worked (for google sheets specifically)
@rgopryc104
@rgopryc104 5 месяцев назад
Love this but: Is there a way to do this without disabling fill in colors? Also I really only need it for rows only, not columns. If you could give some assistance there I'd be very happy. Thank you!
@frankieS2727
@frankieS2727 Месяц назад
I had the same question, so I asked chatGPT: Method 1: Keyboard Shortcut (Manual) This is the quickest way to highlight the row for the selected cell. Here's what you do: 1) Click on the cell you want to highlight the row for. 2) Press and hold the Shift key on your keyboard. 3)While holding Shift, press the Spacebar key. This will highlight the entire row containing the active cell. Method 2: App Script code: function onSelectionChange() { var range = SpreadsheetApp.getActiveRange(); var sheet = range.getSheet(); var rows = sheet.getMaxRows(); var columns = sheet.getMaxColumns(); // Clear any previous formatting sheet.getRange(1, 1, rows, columns).setBackground(null); // Highlight the active cell's row sheet.getRange(range.getRow(), 1, range.getNumRows(), columns).setBackground("yellow"); }
@rgopryc104
@rgopryc104 Месяц назад
@@frankieS2727 thank you! The first keyboard trick works well and I’ll try the script tonight. Appreciated.
@anthadupulasuresh8003
@anthadupulasuresh8003 Год назад
If i apply this code i am unable to fill colour in other cells
@spreadsheet_power
@spreadsheet_power Год назад
This is better than previous. ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-PZSIFBUi08s.html
@digeshwarsahu23
@digeshwarsahu23 Год назад
If i dont want to highlight column then how code will apply.
@spreadsheet_power
@spreadsheet_power Год назад
ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-PZSIFBUi08s.html
@raymondrazon4594
@raymondrazon4594 Год назад
what code should be removed if I just want to higlight row only?
@spreadsheet_power
@spreadsheet_power Год назад
Plz watch this video tutorial for highlighting row only ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-PZSIFBUi08s.html
@user-rw2dp5or7z
@user-rw2dp5or7z Год назад
Highlighting cells seemed so slow,
@spreadsheet_power
@spreadsheet_power Год назад
Ya, its because Google sheets requires internet connection every time we make change
Далее
Highlight Active Row & Column in Excel (7 Levels)
22:56
Excel - Highlight active cell without VBA
1:22
Просмотров 4,8 тыс.
Star Rating Chart in Google sheets/Excel
1:14
Automatically Sort New Rows in Google Sheets
8:08
Просмотров 11 тыс.