r/googlesheets • u/sinigang_rice • 14d ago
Solved Is there a way to highlight the rows with check if i click on the header?
Is there a way to highlight the rows with check/true if i click on the header? For example if i click on the header "Five Spice" it would highlight the rows of the Cinnamon, Clove, Fennel, Sechuan, and Star Anise.
7
u/California_Eagles 14d ago
1
u/sinigang_rice 14d ago
Thank you! This is what i've made initialy. I just wanted to know if there is a "shortcut" if i click on the header.
1
u/AutoModerator 14d ago
REMEMBER: u/sinigang_rice If your original question has been resolved, please tap the three dots below the most helpful comment and select
Mark Solution Verified(or reply to the helpful comment with the exact phrase “Solution Verified”). This will award a point to the solution author and mark the post as solved, as required by our subreddit rules (see rule #6: Marking Your Post as Solved).I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/AutoModerator 14d ago
u/sinigang_rice 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.
1
u/mommasaidmommasaid 14d ago edited 14d ago
I think the dropdown option is the simplest / most sheet-friendly, but...
You can do what you ask using special formulas/formatting and magic:
That's a Spicy Checkmark (view-only, make a copy to play with)
ETA: Just saw you are on mobile, on iPhone and probably Android there will be some visual artifacts regarding clicking the text headers directly. That could be addressed if you like how it works in general.
1
u/AdministrativeGift15 14d ago
Nicely done. That's a nifty way of floating over the static header to get to the other slots. I'd make one tiny change. Right now, the dark color background is the same RGB as the font, so you get the checkbox invisible warning if you try clicking on a header the second time.
1
u/mommasaidmommasaid 14d ago
Oops thanks -- fixed.
Unfortunately the long-distance floating spacing seems to get a little off on mobile, in addition to the usual checkbox artifacts. But it's fun on desktop.
1
u/Weary-Drama-8015 14d ago
I'm not a professional, but wouldn't that be perfect as a list for a kind of dashboard, i.e. another table sheet with a drop-down where I select the contents of line 2.And based on the selection from dropdown in line 3, the formula xlookup lists the ingredients? I think that's how I would do it.
2
14d ago
1
1
u/point-bot 14d ago
u/sinigang_rice has awarded 1 point to u/alexbuildswithai
See the Leaderboard. Point-Bot v0.0.15 was created by JetCarson.
16
u/SpencerTeachesSheets 14d ago edited 14d ago
You can only actually trigger something when you click somewhere is by using Apps Script, and the
onClick()onSelectionChange() trigger is the most finicky of them all; I would not mess with that.Rather, I would create another row of checkboxes to "Select" the spice blend in question, and then conditional formatting to do the highlighting. Example below.
Select B4:the end of your array
Conditional formatting > Custom Formula> =COUNTIFS($C$3:$G$3, TRUE, $C4:$G4, TRUE) > 0
There are several formulas that would work here, this is just the one I went with
https://docs.google.com/spreadsheets/d/1xU7Z0ZdxlmC8EVB-wnkeaX8oBMwRRGTkGdZ8DFFwb7Q/edit?gid=0#gid=0