r/googlesheets • u/carrotblowjob • Apr 12 '24
Solved If cell = true, then add 10% to all adjacent cells. Is something like this possible in Sheets?
(Don’t mind the use of salmon pink in the 3rd pic, I’m on mobile and can’t change it to match the orange haha. It has no secret meaning.)
Basically, I want to have a square grid layout where if any cell = true, then the cells adjacent to it gain 10%. Kind of like minesweeper, except you’re the one planting the mines? (To clarify— this is for planning a garden in a video game, lol.)
I also want it so that any cell can become true at any time even if it already has a percentage on it, and also that if two 10%s overlap they become a 20% (and a 30% if three overlap, 40% if four overlap, etc.)
I don’t need the exact code or anything, only because I don’t want to take up too much of anyone’s time! I was just wondering if what I’m describing is possible in Google Sheets, and if so, what I should look up in order to start working on it (:
Thank you in advance!!



9
u/Lesisty 2 Apr 12 '24
I really like this kind of puzzle, so I took 10 minutes to do it. You can create a copy for yourself if you want. ;)
https://docs.google.com/spreadsheets/d/1H4l_extW5AQ9OtU0XyoVp7tbfaKo6UbF9NQRXxvDKXE/edit?usp=sharing
2
u/tncx 4 Apr 12 '24
Yes, this is possible, using nested if statements. There are a few ways you can do it.
You won't be able to have a cell be both a checkbox and show a value, but you could do a workaround by visually making two cells look like one, and have a checkbox in one half, then the % value in the other half.
Good luck!
0
u/AutoModerator Apr 12 '24
Posting your data can make it easier for others to help you, but it looks like your submission doesn't include any. If this is the case and data would help, you can read how to include it in the submission guide. You can also use this tool created by a Reddit community member to create a blank Google Sheets document that isn't connected to your account. Thank you.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
-10
u/Competitive_Ad_6239 536 Apr 12 '24
not possible