Multiple option selection Dropdown in Google SHEETS

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

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

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

    This is the simplest I've seen someone explain a coding concept. This is just great.

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

    This is awesome and the simplest version I've seen. Is there a way to make the list a bulleted list in the cell vs being separated by commas? Thank you so much!

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

      Thank you!
      I think so
      Try this
      if(activeCol==2 && activeRow>2 && activeSheet.getName()=="Table"){
      var newList=listValue+"
      •"+activeValue
      if(listValue=="") listCell.setValue("•"+activeValue)
      else if(checkForDuplicates==-1) listCell.setValue(newList)
      }
      Kind Regards

  • @sarahnarcisse1275
    @sarahnarcisse1275 6 หลายเดือนก่อน +1

    I love the explaination. It is simple and clear.
    Can we remove a value from the list? Lets say we want to relove wolf and change it for dog for ie.
    I was thinking of using this to highlight project dependencies in sheets.
    The dropdown would have the task names and the selected values would be the task dependencies for a given task.
    Ie :
    Task = order pizza with cynthia
    Dependencies : call the pizza place, wait for cynthia to arrive
    The goal would be to be able to adjust start date and end date based on the dependencies.

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

      Very nice way to implement this into a practical situation!
      Try this:
      if(activeCol==2 && activeRow>2 && activeSheet.getName()=="Table"){
      var newList=listValue+","+activeValue
      if(listValue=="") listCell.setValue(activeValue)
      else if(checkForDuplicates==-1) listCell.setValue(newList)
      else if(checkForDuplicates!=-1) listCell.toString().replace(listValue)
      }
      Regards!

  • @mekiyaaman7612
    @mekiyaaman7612 10 หลายเดือนก่อน +1

    Hi, this works fine, but how do I make the offset values for specific range like if I select drop down from "E" range to only put it in "F" range and not the other ranges😢

  • @BustosEnzo
    @BustosEnzo 2 หลายเดือนก่อน +1

    Hey, your video was awesome and very clear!
    It is a shame that GSheets does not have this basic implementation yet.
    One sugestion is to make all the elements on the output list in the same order e.g.: alphabetically.
    Because if in the 1st row you select Cat, Dog, Wolf the output will be different if you select Wolf, Cat, Dog in the 2nd row.

    • @practicalsheets
      @practicalsheets  2 หลายเดือนก่อน

      You are right
      I have a more updated version of this video, and am doing some advanced variations. The alphabetical order one makes a lot of sense, and I will include it in part 3. Thanks for the suggestion!
      Here is the series
      th-cam.com/video/0FLPpHyiMkA/w-d-xo.html
      Kind Regards

  • @kristasantacroce1513
    @kristasantacroce1513 8 หลายเดือนก่อน

    Thank you for this straight-forward and easy to understand google sheet coding solution.

  • @89suburban350
    @89suburban350 10 หลายเดือนก่อน +2

    Hello Juan, Did any of this change with the 2023 update to sheets?

    • @practicalsheets
      @practicalsheets  10 หลายเดือนก่อน +1

      Hello!
      It shouldn´t have changed
      Kind Regard!

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

    Genius and new idea.
    Although I hate programming, you made it clear and simple.
    Thanks a lot

  • @MercyMwangi-w9m
    @MercyMwangi-w9m ปีที่แล้ว +2

    Hi, this was so helpful. Thank you so much for sharing your knowledge.
    How can I apply the same script, but using a range of different values and in different columns and cells on the same sheet?
    I am new to this and your content has been very helpful!!

  • @paxtonmcpherson
    @paxtonmcpherson 9 หลายเดือนก่อน

    Hello, I am up to the section where you offset activeCell into the column next to it. What code can I use to make the selections appear in column in another tab of my document instead?

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

    Thank you for this code! Is it possible to add different value based on the selected answer from the dropdown menu?
    What I am looking for:
    Let's say that in Options spreadsheet, I will have another column, Latin names of the animals, so if A2 is Dog, then B2 is Canis Familiaris. So when I choose Dog from dropdown menu in Table sheet, can I add value from B2, Option sheet (so Canis Familiaris) to C3 Table sheet, instead of the word Dog?
    In other words, if I choose Dog, can the words Canis Familiaris appear in the next column?

    • @practicalsheets
      @practicalsheets  11 หลายเดือนก่อน

      Hello!
      You could do this with a VLOOKUP formula in C3
      VLOOKUP(B3;Options!A:B;2;0)
      Regards!

  • @jiyashareef5289
    @jiyashareef5289 9 หลายเดือนก่อน

    Is there a way to apply this to multiple tabs with identical format? Row and column are the same but I need to apply multiple selection function to all tabs.

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

    I liked it. But is there any option if I can remove selected item when I select again from drop down list instead of removing it manually from selected column?

  • @SkyDeLosSantos-lq1wu
    @SkyDeLosSantos-lq1wu ปีที่แล้ว +1

    Great! but do we have to pay just to get your formula?

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

      Hello
      I can give you the formula practicalsheets@gmail.com
      Some people like to support me
      Regards!

  • @zaiquiriw
    @zaiquiriw 4 หลายเดือนก่อน +1

    Just to keep this up to date, the UI has changed a bit, but this still works. When you select your data validation method, just make sure to select the Critera: "Dropdown (from a range)"

    • @practicalsheets
      @practicalsheets  4 หลายเดือนก่อน

      Thanks for sharing!
      Here is a more updated version
      th-cam.com/video/0FLPpHyiMkA/w-d-xo.html
      Kind Regards

  • @Beatriz-c6y
    @Beatriz-c6y ปีที่แล้ว

    Thank you for this! How can I copy onto multiple tabs on same worksheet?

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

    This worked PERFECTLY for what I was needing! Thank you so much!

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

      Great news!

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

      @@practicalsheets Nice one thanks .i have another requirement like need to create one more multiple dropdown parallel in next cell of the value in D dropdown &the value is in E,drop for let' say fruit.. how to create that can u help me

  • @sirdon1908
    @sirdon1908 11 หลายเดือนก่อน

    Hi at 10:36 you say, if you are happy for duplicates to happen, then that is it. Yes, i want duplicates, but it only happens if i choose dog,cat,dog. It does not work if i choose, dog, dog. How can i fix this?

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

    Thanks for this video! I implemented the same solution but when I select a value from the drop down it takes 8-10s to show up in the selected values cell. How can I make it faster?

  • @jeffmower7479
    @jeffmower7479 3 หลายเดือนก่อน +1

    I am getting the error "TypeError: ListValue.toString(...).IndexOf is not a function"
    Any suggestions?

    • @practicalsheets
      @practicalsheets  3 หลายเดือนก่อน

      May you send me your code?
      Kind Regards

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

    You made it so simpler and clear, thanks, it worked like a gem

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

    Thanks so much, this was incredibly useful!

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

      Thank you for commenting!

  • @MarleneWatson-q9r
    @MarleneWatson-q9r 2 หลายเดือนก่อน +1

    Any suggestions on what to do if I am getting a red error code saying the code is invalid? Thanks

    • @practicalsheets
      @practicalsheets  2 หลายเดือนก่อน

      Sometimes you may be missing a comma, a parenthesis or a bracket
      Kind Regards

  • @VickyArseneault
    @VickyArseneault 3 หลายเดือนก่อน +1

    thank you very well explain exactly what I needed!

    • @practicalsheets
      @practicalsheets  3 หลายเดือนก่อน

      Thank you for commenting!

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

    Nice one thanks .i have another requirement like need to create one more multiple in next cell of the value in D dropdown &the value is in E,drop for let' say fruit.hiw to create that

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

    How can I tweak that to append the new selection in place? I think it works but the text concatenation appears underneath the dropdown menu, so it is not visible unless I remove the menu from the cell :/

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

      Hello!
      I´m not sure I understand the particular case
      Regards!

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

    can I do this and apply to the entire column on a single sheet? and on multiple cells in a single sheet?

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

      It should work!
      Let me know if it doesn´t
      Regards!

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

    Thank you so much for the detail! It is awesome and so helpful!👍

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

    I tried it and it works but when I tried it for another column in the same sheet, it blocks each other, if one works, the other stops. Any solutions?

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

      Let me see your code
      Regards!

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

      @@practicalsheets
      function multipleSelection(){
      var activeCell=SpreadsheetApp.getActiveRange();
      var activeCol=activeCell.getColumn()
      var activerow=activeCell.getRow()
      var activeSheet=activeCell.getSheet()
      var activeValue=activeCell.getValue()
      var listCell=activeCell.offset(0,1)
      var listValue=listCell.getValue()
      if(activeCol==11 && activerow>2 && activeSheet.getName()=="A"){
      var newList=listValue+","+activeValue
      if(listValue=="")listCell.setValue(activeValue)
      else listCell.setValue(newList)
      }
      }
      function onEdit(){
      multipleSelection()
      }

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

      @@practicalsheets
      I tried it now again but unfortunately it doesn’t work for any column

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

      @@marwaomar9127 HEllo! I would have to see the code. Regards!

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

    Work perfectly
    Thank you so much

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

    Hello sir.when i run this script this error comes for me."spreadsheetapp is not defined".what should i do for it?

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

      Hello
      Be careful with capitalization
      SpreadsheetApp
      Regards!

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

    how would you delete if incase you erroneously selected one or two?

  • @AmanJuyal-p9c
    @AmanJuyal-p9c ปีที่แล้ว +1

    ReferenceError: activeCol is not defined i am getting this error

  • @TdotTbot
    @TdotTbot 6 หลายเดือนก่อน +1

    At first I'm like this is the wrong video, then I saw column C and I was like aaaaahhhh, ooooooo.

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

      I assume then, that it was useful (althought a bit deceptive, haha). Hope it worked
      Regards!

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

    I tried with your code but it dint worked can u suggest what might have been problem.

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

      Hello!
      Can you show me the code you have?
      Regards!

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

    can anyone help it is not working and I dont know why. Its like its not even being added to my sheet. iv copied it exactly

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

      Were you able to solve?
      Kind Regards

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

      @@practicalsheets no

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

      yes its not working though

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

      @@vjarun_og_yt Could you share your code? Kind Regards

  • @DanielHenrique-gr9vp
    @DanielHenrique-gr9vp ปีที่แล้ว +2

    How can i clear the cells in this code?

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

      Hello! I will work on a second version with your comments.
      Regards!

    • @sarahnarcisse1275
      @sarahnarcisse1275 6 หลายเดือนก่อน +1

      ​@@practicalsheetswhere you able to do a second version?
      I am interested in this result.

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

      @@sarahnarcisse1275 Yes. Here it is
      th-cam.com/video/0FLPpHyiMkA/w-d-xo.html
      Kind Regards

  • @sampletext2219
    @sampletext2219 9 หลายเดือนก่อน

    Thank you!

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

    Please include the final code in the video description so I can copy it and just make the modifications as needed. thank you.

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

      Hello!
      For the moment, my system is to give the templates and code for the members of the patreon.
      I understand some people give their scripts in the description, but for now this is the way I have better found for this marvelous community to support the continuation of this content
      I hope you understand
      Regards!

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

    Amazing man ! Thanks

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

    wow amazing
    Thanks a lot 🤩😍

  • @nigel-uno
    @nigel-uno 3 หลายเดือนก่อน +1

    This should be a built in feature.

  • @CristianAMartinez-x3q
    @CristianAMartinez-x3q ปีที่แล้ว +1

    Now I want to create formula that will multiply the number of selected items by another cell.

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

      Interesting!
      We could count them using SPLIT
      =COUNTA(SPLIT(B2,","))*C2
      Hope it helps
      Regards,

  • @vjarun_og_yt
    @vjarun_og_yt 6 หลายเดือนก่อน +1

    its not working only

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

      Hi!
      Any specific error?
      Kind Regards

  • @Property.Bazaar.Thane.Dhokali
    @Property.Bazaar.Thane.Dhokali ปีที่แล้ว +1

    This vdo only for genuis engineer

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

      Hello!
      Sorry it is a bit complicated
      I try to make it easy to follow but I know sometimes I fail
      Thanks for commenting
      Regards!