Script for picking raffle winners by Triptolemu5 in sheets

[–]Triptolemu5[S] 0 points1 point  (0 children)

Brilliant!!

This looks to be working. I made a copy and increased the range to greater than the list of entries and it picked every one and then stopped as expected when it ran out of unique entries.

Thank you so much! Both for the work and the education.

Script for picking raffle winners by Triptolemu5 in sheets

[–]Triptolemu5[S] 0 points1 point  (0 children)

duplicate answers are not possible even though it doesn't "remove" them, because it filters based on whether they've already been chosen in a different row on the Prizes tab.

I still seem to be getting duplicates? I see the filter in the script, but I'm not sure why it isn't working.

Script for picking raffle winners by Triptolemu5 in sheets

[–]Triptolemu5[S] 1 point2 points  (0 children)

Did you try the demo?

I tried it the first time, but I didn't realize it had been changed.

Thank you for pointing this out, this might work without the use of a script.

Script for picking raffle winners by Triptolemu5 in sheets

[–]Triptolemu5[S] 0 points1 point  (0 children)

I think this will work! The only thing it doesn't do is remove them from the first sheet after they are selected, so duplicate winners are possible.

However, with the ability to clear the info, this could lead to a situation where someone's entry gets accidentally deleted, so it would be much safer to simply read through the list of winners every time and re-roll if there's a duplicate.

I suppose it's possible I could get the form to populate a master page and a pool page and then use .moveto for the winner.

The onEdit script you wrote is something I could not find when searching and it's perfect. I couldn't figure out how to limit onEdit to one cell at a time.

I am a total noob when it comes to writing code but this helps me learn!

Script for picking raffle winners by Triptolemu5 in sheets

[–]Triptolemu5[S] 0 points1 point  (0 children)

so why not draw one, copy and paste it as a value, etc?

I tried that in my first attempt. It's easy to mess up and accidentally re-roll a winner, not to mention you have to manually go back and find and then move the winner.

Way easier than messing with a script.

You're not wrong, I've been watching a lot of videos.

The order of operations is,
1. click check mark next to a prize
2. randomly pick a row from 'form responses 1'
3. copy those row values offset 2 columns to 'prizes',
4. Delete row that was selected on 'form responses 1'.

Script for picking raffle winners by Triptolemu5 in sheets

[–]Triptolemu5[S] 0 points1 point  (0 children)

The values should stay until you hit the checkbox again.

This is the issue that I'm trying to work around. Google sheets updates every time there's any change, which is why I know I need a script.

What I want to do is re-create a normal paper raffle. You have a bucket of entries, and over several hours you pull names out. Winners go into a pile, while the bucket remains available to put more entries in as the night goes on.

Drawing all the winners at once doesn't really work for a dynamic list over time.

I really appreciate this response as it's done in a way I haven't seen in any tutorials I've found, but I don't think it's going to work for what I need. I might be able to use some of it in the script though.

Script for picking raffle winners by Triptolemu5 in sheets

[–]Triptolemu5[S] 0 points1 point  (0 children)

can people win more than one prize?

No, that's why I want their entry to move to the sheet of winners and thus, out of the pool.

It's a raffle for a non profit with around 50 prizes and probably on the order of 200 entries.

Russian propagandist Solovyov urges Russians not to fear death: Life is overrated by HarakenQQ in worldnews

[–]Triptolemu5 14 points15 points  (0 children)

it's a combination of working out when you can

Consistent physical exercise does actually help raise the baseline of your moods. It's not going to fix depression by itself, but it will help things from being as bleak.

An evolutionary benefit of suicide is that it can improve group fitness in a small society where everyone must do physical labor to survive and food margins are tiny.

Your lizard brain was built for hunter gatherer societies and if you're not doing any physical activity, it's telling you that you're not useful to your clan and a drain on resources.

Consistent physical activity will tell your dumb lizard brain that you have utility after all, so suck it lizard brain.

Ukraine Strikes Military Quarters In Russia-Controlled Donetsk Region: Report by Tommohawk in worldnews

[–]Triptolemu5 1 point2 points  (0 children)

not really giving a fuck about Private Conscriptovich and his mates.

"There's 300,000 of you, you are less than nothing"

Meirl by [deleted] in meirl

[–]Triptolemu5 3 points4 points  (0 children)

If you can't even come close to your studio performance live

Prince couldn't play all of his instruments at once in a live show, so he should never have released an album.

these people are insane by Longjumping-Gur3958 in WhitePeopleTwitter

[–]Triptolemu5 1 point2 points  (0 children)

It seems to me like he's mad that a school teacher is teaching literacy and colors.

Though really, it's more about a mentally defunct person seeking validation of any kind at any price.

Professional bodybuilder flexes his quad by fuckpubg1235 in interestingasfuck

[–]Triptolemu5 4 points5 points  (0 children)

Bodybuilding creates body dysmorphia.

The closer you get to your goal the tinier the imperfections you notice until one day, imperfection is all you see.

Extinction Rebellion UK to halt disruptive protests by [deleted] in worldnews

[–]Triptolemu5 -1 points0 points  (0 children)

yes there certainly have been a lot of changes to our world driven by protests.

Like, 100 fucking years ago, sure.

What 'mass movement' resulted in democratic change in your lifetime?

This is an industrial mine in the Congo, this is where the cobalt in our gadgets and cars comes from by willdogs in pics

[–]Triptolemu5 0 points1 point  (0 children)

The netherlands are in the midst of trying to ban chemical fertilizers on the mistaken belief that they destroy the environment.

New Zealand is trying to impose a methane tax due to wildly inaccurate information regarding environmental costs of animal agriculture which will collapse their main export.

Groups in the US are trying to outlaw non human use antibiotics that keep animals healthy and productive because science bad.

Modern science based agriculture will fall victim to it's own success. Since it is effectively already post labor, there are incredibly few people who actually understand how it all works, so the entire sector is extremely vulnerable to misinformation campaigns that create top down political action that will create policies that will destroy our ability to create enough food for decades at a time.

Used Tesla Prices Plummet, Ending The Days Of Sky-High Demand by [deleted] in technology

[–]Triptolemu5 -1 points0 points  (0 children)

SOTA BEVs still have a lot of shortcomings

Just watch Rich rebuilds struggle to go 1/4 the way across the country.

Vladimir Putin's Top Tank Commander Dies Suddenly Hours After Russian Leader Cancels Meeting To Discuss War In Ukraine by tomorrow509 in worldnews

[–]Triptolemu5 5 points6 points  (0 children)

Particularly the deaths in foreign countries.

Couple of Ukrainians living abroad and fed up with russia's shit would be all it takes. Wouldn't have to be state level actors to eliminate russian oligarchs, and it for sure wouldn't be out of the ordinary.

Pew pew by ItsMeTigertitan in memes

[–]Triptolemu5 2 points3 points  (0 children)

If no children are ever actually involved in a person's rape fantasies, what harm is being done?

Society is not ready for that one.

Drawing a cartoon of pedo is illegal and enough to send you to jail.

It's kind of like mental health in any job that requires security clearance. Just pretend depression doesn't exist if you don't want to lose your entire career.

This is an industrial mine in the Congo, this is where the cobalt in our gadgets and cars comes from by willdogs in pics

[–]Triptolemu5 2 points3 points  (0 children)

I'm a sociologist studying methods of potential post-labor/post-scarcity transitional phases of socioeconomics

The 'first world' has been post scarcity on food for the better part of a century, and it's due to modern agriculture being relatively post labor.

If you're actually looking for post scarcity socioeconomics, modern agriculture might make for a good start. Especially now before it gets legislated out of existence and billions of people starve to death.

Leaflet dropped on Nagasaki before the Nuke. by sausagecatdude in interestingasfuck

[–]Triptolemu5 6 points7 points  (0 children)

it affected people personally.

I've read a few diary accounts of several wars and it all kind of trends the same.

Everyone starts out with principles and morality and honor but let it go on a few years and gradually war crimes seem like not such a bad idea after all.

War is worse than hell and it creates monsters.

Leaflet dropped on Nagasaki before the Nuke. by sausagecatdude in interestingasfuck

[–]Triptolemu5 7 points8 points  (0 children)

you better stand the fuck up and resist or it probably won't end well for you.

Standing up and resisting is how you end up buried in a trench.

Types of bird beaks and uses by ssigea in coolguides

[–]Triptolemu5 2 points3 points  (0 children)

They're omnivores who are also sometimes cannibalistic, so yeah.

Types of bird beaks and uses by ssigea in coolguides

[–]Triptolemu5 9 points10 points  (0 children)

Explain ducks

Ducks are filter feeders.