Google Apps Script Search Sheet Get cell data with Google Sheets select column data or entire sheet

แชร์
ฝัง
  • เผยแพร่เมื่อ 7 พ.ย. 2024

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

  • @NukeCompositingMentor
    @NukeCompositingMentor 3 วันที่ผ่านมา

    Hey Laurence, great content. Question, Is it possible to copy data from a cell in column C to column M (column C is showing an image through a dynamic URL, so it's not a typical jpeg or png ending but Google Sheets is able to read the dynamic URL and still display the image properly. Since all the rows in column C have the same code, the image will only show if the streamer is live)? I'm currently using Google Apps Script for this.
    The end goal here is if the streamer is live, the row will turn green and if offline, it will be gray. I am driving my colour based on if an image is present or not.
    Any help will be appreciated, thanks!

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

    I have one tab of g sheet that has the G sheet file IDs I want to import data to.
    However the data I want to import (copy and paste) is a different array.. And the data I want to import for each file id is the row below the one used previously
    I've set up both Google tab ranges as arrays. But what sort of for loop would be needed to move down a sheet row for every file id...
    Seems like a for I=0, I++ sort of for loop is needed?

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

      The sheets and docs use a nested array structure each row is it own array within an array

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

      @@LaurenceSvekisCourses thanks.
      But it's more like. I want to copy the first row of data in sheet (array) foreach file ID (element) and paste in the sheet of that file ID
      But I am having trouble getting the target row to copy to be incremented by 1 row down to keep up with the file ID foreach loop.
      If that doesn't make sense I'm sure it's my fault. Either way appreciate you taking time to respond earlier.

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

      Maybe I see what u mean. Make the whole range of cells I want to copy for every file. But each sheet row of range is it's own array.
      At that point I need some sorta counter

  • @MuhammadNaeem-wy9zt
    @MuhammadNaeem-wy9zt ปีที่แล้ว +1

    Hello Laurence Svekis, I have a google sheet having two sheet, one is admission form and other is database, in Admission form I have a search button in addition to other buttons, but I have a problem with search button that it search one record the oldest record, but i need when I click search button everytime it must display a new duplicate record available in database.. may you help me in this regard, I can send you that sheet.

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

      Please connect with me on my website and I can provide additional contact information for someone that can assist you. basescripts.com/contact

    • @MuhammadNaeem-wy9zt
      @MuhammadNaeem-wy9zt ปีที่แล้ว

      Ok

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

    Hi Laurence. More power to youu and your channel for its great content. Im hoping to get your help. Im new with coding. What i want is to search on an active sheet with value, let say A1 with unique ids. And this unique ids also being added to Main Sheet. When user is on the active search to have a function that can search the value in an active sheet A1(unique ids) and if it matches in the Main Sheet it should set value of a time stamp corresponding to that unique ids row.

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

      Is this from a UI menu button, you can select the active sheet with the getActiveSheet()
      function searchIt(){
      const sheet = SpreadsheetApp.getActiveSheet()
      const findString = "test"
      const textFinder = sheet.createTextFinder(findString)
      const cell = textFinder.findNext();
      const row = cell.getRow();
      const col = cell.getColumn();
      Logger.log(`Found at row ${row} col ${col}`)
      }

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

      Above code will find a matching cell row and column values for the findString text.

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

      Appreciate it Laurence. Is it possible to run it with for loops? Once it finds the matching value from active sheet to my main sheet it will assign a timestamp to corresponding row. Example on my active sheet(Sheet1) once it finds the exact value lets say "test" in A1(Sheet1) to my main sheet(Main) it will update the corresponding column on Main with a timestamp lets say in B1.
      Example:
      Main(Main Sheet)
      A1 Value - "test"
      Since it matches to Sheet1 A1 value, B1 cell on main sheet should have a timestamp in it.
      Sheet1(Active Sheet)
      A1 - "test"

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

    Thanks 🙏

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

    Fantastic. Thank you!

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

    Thanks!

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

    How we can make a search box and take a cursor to that text and highlight

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

    thanks