How to make Clear Cell Button in Google Sheets

แชร์
ฝัง
  • เผยแพร่เมื่อ 30 ก.ย. 2024
  • In this video, I will show you, How to make Clear Cell Button in Google Sheets.
    ** Premium Service **
    bit.ly/2TiFH5l
    bit.ly/2NaJtY9
    bit.ly/2IezzWG
    Facebook Page:
    goo.gl/mVvmvA
    goo.gl/FmZ84U
    Please Subscribe My Channel:
    goo.gl/9kkcty
    Button Script:
    function clearActiveSheet() {
    SpreadsheetApp.getActiveSheet().getDataRange().clear();
    }
    #Clear_cell_button #Insert_clear_cell_button #Add_clear_cell_button

ความคิดเห็น • 28

  • @Evandermultimedia
    @Evandermultimedia 2 ปีที่แล้ว +2

    I followed your video to script a delete button..
    However is not working on phone in google sheet. Please how do I go about it ??

  • @sugatachandrawinata7585
    @sugatachandrawinata7585 7 หลายเดือนก่อน +1

    my friend. suppose i want delete one of those, maybe in cell range d10 or e13. how can i do that?

  • @snayq
    @snayq 2 ปีที่แล้ว +13

    function clearCells() {
    SpreadsheetApp.getActiveSpreadsheet().setActiveSelection("B2:F23");
    SpreadsheetApp.getActiveRange().clearContent();
    }
    You can change "B2:F23" for your own

    • @walkchill9920
      @walkchill9920 ปีที่แล้ว

      How can I ad multiple cells which are not connected? I want to delete multiple unconnected cells by pressing the clear button. THX!

    • @miguelfernandez4276
      @miguelfernandez4276 ปีที่แล้ว

      Thank you thank you thank you

    • @rafaelferreira2370
      @rafaelferreira2370 ปีที่แล้ว

      @@walkchill9920 function clearRange() {
      SpreadsheetApp.getActiveSheet().getRangeList(['B6:I9', 'B11:I15', 'Y20']).clearContent()
      }

    • @SadinCss
      @SadinCss 6 หลายเดือนก่อน

      @@walkchill9920 like this function clearCells(){
      var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
      sheet.getRange("C6:C7").clearContent();
      sheet.getRange("C14").clearContent();
      sheet.getRange("D29:D59").clearContent();
      }

  • @michaelcohen7252
    @michaelcohen7252 3 ปีที่แล้ว +4

    any way I can clear only certain cells?

    • @crazedhark5200
      @crazedhark5200 2 ปีที่แล้ว +1

      hey man, have you managed to find a solution for this?

    • @michaelcohen7252
      @michaelcohen7252 2 ปีที่แล้ว +1

      @@crazedhark5200 Nope. but let me know if you do.

    • @afiababy22
      @afiababy22 2 ปีที่แล้ว

      Watch this --th-cam.com/video/RaU-Fh7SsWE/w-d-xo.html

    • @dutchWhale
      @dutchWhale ปีที่แล้ว

      @@michaelcohen7252 ​ If you havent found anything yet, I've done it this way.
      function ClearCells() {
      const ss = SpreadsheetApp.getActiveSpreadsheet()
      const ws = ss.getSheetByName('SHEET NAME')
      ws.getRange('A1').clearContent()
      ws.getRange('A2').clearContent()
      ws.getRange('A3').clearContent()
      And you can just keep adding more cells to it.

  • @cegars
    @cegars 5 หลายเดือนก่อน

    It's working well when I use my computer, but when I use my sheet on my phone on the app, I can't use the button, is it possible to use it with phone?

  • @danielhaynes331
    @danielhaynes331 2 ปีที่แล้ว +1

    How did you get the script editor it's not there for me

    • @y2ggaming397
      @y2ggaming397 2 ปีที่แล้ว

      same for me, you need google Apps Script

    • @afiababy22
      @afiababy22 2 ปีที่แล้ว

      Go to Google Drive-- new--more--Google apps script

  • @shashasag
    @shashasag ปีที่แล้ว

    is the permission required for every user?

  • @zaibasiddiqui9085
    @zaibasiddiqui9085 4 ปีที่แล้ว

    At 3:52 data did not get clear, because cursor was there. So how to clear that cell also if cursor is there?

    • @ConsulthinkProgrammer
      @ConsulthinkProgrammer 3 ปีที่แล้ว

      It's not because cursor still there, but the data not entered yet into the cell, so the value of it cell still empty.
      After you typing in one cell, you must press enter or tab button, or click in another cell to make your data entered into that cell. See this for more reference bout apps script th-cam.com/video/Z5n-q2W_5QM/w-d-xo.html

  • @afiababy22
    @afiababy22 2 ปีที่แล้ว

    @1:13- I don’t see the assign script-

  • @GuilainMusic
    @GuilainMusic 3 ปีที่แล้ว +1

    This is great thanks!!

  • @Quintavius
    @Quintavius 3 ปีที่แล้ว

    Very helpful thank you. Wondering if you know of a way to protect the "button" so that only certain users can clear the data?

    • @PDFEditing
      @PDFEditing  3 ปีที่แล้ว

      you can give access to anyone

  • @auliafristi3286
    @auliafristi3286 6 หลายเดือนก่อน

    THANKYOU!!

    • @PDFEditing
      @PDFEditing  6 หลายเดือนก่อน

      welcome

  • @shandani7215
    @shandani7215 3 ปีที่แล้ว +1

    Why aren't you narrating? It will make your video worth watching.