Тёмный

Google Sheets - Loop Macro Through All Worksheets - Apps Script 

Learn Google Sheets & Excel Spreadsheets
Подписаться 274 тыс.
Просмотров 25 тыс.
50% 1

Learn how to record a macro and make adjustments to loop through all sheets using Apps Script in Google Sheets.
#googlesheets #macro #javascript

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

 

9 авг 2019

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 38   
@gregoryunderwood4121
@gregoryunderwood4121 5 лет назад
Brilliant!!! Can't thank you enough! You just saved me a lot of time!
@McEArt
@McEArt 6 месяцев назад
Thanks! Your videos have made my new business so much ease!
@paulloup5210
@paulloup5210 5 лет назад
Thank you very much
@Condorito576
@Condorito576 4 года назад
Thank you!!!
@gsa1440
@gsa1440 4 года назад
Excelent!!
@g_morissette
@g_morissette 4 года назад
This is brilliant. WYSIWYG then code editing. No more or way less looking around online for syntax tips.
@faisal-ca
@faisal-ca 2 года назад
Thank you very much. This is exactly what I was looking for and it worked like magic.
@ExcelGoogleSheets
@ExcelGoogleSheets 2 года назад
Great to hear!
@pichit.raetai
@pichit.raetai 5 лет назад
Thank you
@vedantmishra
@vedantmishra Год назад
YOU SOLVE MY WHOLT PROBLEM THANKS
@vallithen3132
@vallithen3132 4 года назад
You are great
@somsaude6984
@somsaude6984 3 года назад
Thanks
@nicolascabello2290
@nicolascabello2290 3 года назад
Thanks a lot. It would be great if the code should start the loop from the current active sheet, it would be easier to use it anywhere
@RockstheSquirrelMobian
@RockstheSquirrelMobian 2 года назад
Nice video. I was just wondering on the last row part, why not just take out the 19 all together as that will go to the last row itself instead of adding more code (At least for this example)? (example: ('A6:C')
@HakendaNatan
@HakendaNatan 2 года назад
good
@kevinescano9811
@kevinescano9811 3 года назад
hi, is there a way to apply the macro to a listed sheet name? thanks
@ronelarinal1865
@ronelarinal1865 3 года назад
awesome! just one thing i would ask. how about if more sheets to be excluded?
@uzomasochukwuuchechukwu-ag5525
@uzomasochukwuuchechukwu-ag5525 2 года назад
exactly
@IceCreamHouseLU
@IceCreamHouseLU 2 года назад
Hi, this is the lesson I've been looking for! How do we exclude more worksheets?
@rajeshr8887
@rajeshr8887 2 года назад
The following AppsScript inserts a new row above row 12 and copies the formula from row 13 and pastes in the new row 11 that was created for Sheet 1 & Sheet 2, you can modify the section "var tabs =[ ]" to include all the sheets where you need your script to be executed taking care to use the correct sheet names. The rest of the sheets in the spreadsheet remain unaffected. function addNewRow() { var tabs = [ 'Sheet 1', 'Sheet 2', ]; var spreadsheet = SpreadsheetApp.getActiveSpreadsheet(); for (var i = 0; i < tabs.length; i++) { spreadsheet.setActiveSheet(spreadsheet.getSheetByName(tabs[i]), true); spreadsheet.getRange('12:12').activate(); spreadsheet.getActiveSheet().insertRowsBefore(spreadsheet.getActiveRange().getRow(), 1); spreadsheet.getActiveRange().offset(0, 0, 1, spreadsheet.getActiveRange().getNumColumns()).activate(); spreadsheet.setActiveSheet(spreadsheet.getSheetByName(tabs[i]), true); spreadsheet.getRange('13:13').copyTo(spreadsheet.getActiveRange(), SpreadsheetApp.CopyPasteType.PASTE_NORMAL, false); } } Hope this helps. Of course you need to modify the rest of the script to suit your requirement. Let me know if it works for you.
@4thfolio292
@4thfolio292 2 года назад
Thank you so much, just wanna ask, what if, you only want selected sheets to be part of your loop macros? Instead of (var allsheets) what should I put? Looking forward for your reply ☺️🙏
@ExcelGoogleSheets
@ExcelGoogleSheets 2 года назад
Given that selecting several sheets was recently introduced, I don't think it made it as a part of Apps Script API yet. So as far as I know, at the moment you can only get the sheet which is currently active & that's it.
@ExcelGoogleSheets
@ExcelGoogleSheets 2 года назад
I would use the logic in this video with checkboxes as a workaround ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-P0L2K7AXufw.html
@4thfolio292
@4thfolio292 2 года назад
Thank you for response
@vanshshah5921
@vanshshah5921 2 года назад
i cant figure out a way to add a macro to all my other spreadsheets can u help me with that? so i get a repeated dataset everyday but each in a new sheet so how do i add that macro to all my other sheets?
@everythingyouneedtoknow3158
Can you use the same script to the new worksheet?
@ExcelGoogleSheets
@ExcelGoogleSheets Год назад
yes
@adminwondercrust1179
@adminwondercrust1179 Год назад
sir i'm trying to record macro in google sheets. But while recording it showing "activating previous sheet" rather than activating named sheet. and paste data anywhere without any command.kindly make latest video to solve my problem to record macro in google sheets 🙏🙏🙏🙏🙏🙏🙏🙏🙏
@ABsazerNer
@ABsazerNer 4 года назад
Google sheets seems more amazing than Excel by using JavaScript instead of VBA
@amitk2784
@amitk2784 4 года назад
in what way?
@srider33
@srider33 4 года назад
Microsoft is well aware of this which is why they are trying to push everyone off of VBA to their own version of Javascript (typeScript).
@srider33
@srider33 4 года назад
@@amitk2784 not as compatable. Particularly on web and mobile phones.
@vallithen3132
@vallithen3132 4 года назад
@@srider33 typescript is not intended for what you said. It's for a different purpose .
@Flawet
@Flawet 2 года назад
Hello I've done what you show in the video but it doesnt want to skip the sheet I've selected to not execute the macro on it
@ExcelGoogleSheets
@ExcelGoogleSheets 2 года назад
What's your code?
@Flawet
@Flawet 2 года назад
@@ExcelGoogleSheets Thank you for your quick response I just forget to put the () on a function 👍
@ExcelGoogleSheets
@ExcelGoogleSheets 2 года назад
👍
@uzomasochukwuuchechukwu-ag5525
@uzomasochukwuuchechukwu-ag5525 2 года назад
How can i ignore multiple sheets with this your formula, this is urgent, thank you
Далее
How to VLOOKUP in Google Sheets with Apps Script?
17:16
Smart Sigma Kid #funny #sigma #memes
00:26
Просмотров 6 млн
How Google Apps Script Foreach Loop Works
11:37
Просмотров 10 тыс.
Google Sheets For Loop with If Statement
10:30
Просмотров 24 тыс.
Google Apps Script Fast Loop
10:27
Просмотров 4,8 тыс.
Google Apps Script For Loop
19:09
Просмотров 19 тыс.
How to Create Loops in Google Sheets App Script
9:59
Просмотров 2,7 тыс.
Smart Sigma Kid #funny #sigma #memes
00:26
Просмотров 6 млн