How to conditionally add a clickable checkbox in google-sheet? - google-sheets

I have tried:
=if(B11="","","☐")
But I wanted to add a clickable checkbox and not just the symbol.

Ok, so sheet does not have a way to hide/show validation checkboxes, but I did find a work-around.
Add the checkboxes via Data/Data Validation
Set the fill color to black
Set the text color to white
Now, set up conditional formatting using a custom formula
=C20=""
Set text color to none
Set fill color to white
I built a tab in this sheet call Checkboxes so you can make a copy and experiment. In this sheet I just added the checkboxes using the Insert/Checkbox instead of via Data/Data Validation
https://docs.google.com/spreadsheets/d/1qbLOjTdzISICTKyUp_jK6gZbQCt-OwtDYYy3HNJygeE/edit#gid=1995409740

Related

How to toggle cell color when clicking on that cell

I'm trying to find function that will change (toggle) cell color when you would click on it.
For example, I have cell that that only has number "1" on it and it's default color is white, so when I click that cell (like you would on click on a checkbox) the color should now be blue. If you would click it again, the color should go back to white etc.
What I tried so far:
Using Dta validation to change checkbox value to text so that both TRUE and FALSE statements simply are written as number 1, but I got validation error that both states couldn't be named the same
Using Conditional formatting. so when checkbox is checked, color of that cell is changed (this works to some degree, but for some reason not when I use it together with Data validation)
Does anyone have solution on how should I approach this?
In theory it could be possible with the onSelectionChange trigger on an apps script function. It could be a simple function that:
Gets the selected or active cell range
If the background color is white, changes it to blue
If the color is already blue, changes it back to white
Changing color is already doable with the setBackground function.

Google Sheets - Applying Fill Colour to Several Individual Cells (without having to use dropdown menu)

Very very minor thing I find annoying and / or haven't figured out what I am doing wrong on Google Sheets.
In Excel, when you turn a cell a specific colour, it remembers the last colour you used, so you can click on the colour fill button and it will apply the same colour, rather than having to re-select it in the dropdown menu (see example screenshot of 'Excel').
In Google Sheets, the button shows the current colour of the cell (which I think is self-evident anyway), so I have to go into the drop down menu each time to select the new colour (see example screenshot of 'Sheets').
So my question is - is there a way for Google Sheets to retain the last colour used on the fill colour button?
What might be handy, is the format painter (Circled icon). Not perfect, but may save you 1 or more clicks. Just select the cell you want to copy the format, click on the format painter and click on the new cell or range (with control) you want to apply the format.
unfortunately no. in Google Sheets you always need to enter the color picker so this can be done by a minimum of two clicks
the only tool that remembers color is border color

Text selected without showing the pins

Is there a way to programmatically select a text without showing the pins at the beginning and at the end of the selected text?
Example:
Although you should be more precise, I presume you just want to highlight some parts of the text with a background color. Therefore you can use NSAttributedString.
You can look up how to create an attributed String here and how to use background color on it here.

Set default text size/color for text boxes in Master Slide PowerPoint 2013

I'm working with a PowerPoint document which annoyingly sets all newly inserted text boxes' color to Red and uses Century Gothic. I believe this is due to the Master Slide being used by the document.
I would like to remove this automatic setting from text boxes in the Master Slide but I cannot figure out how?
I have gone into the Master Slide view and found that there are no text physical text boxes, there are however "Text Placeholders" but no text boxes. I find it strange and wonder:
how are these newly inserted text boxes contain pre-set font type and color?
If you aren't trying to do this in code, StackOverflow isn't really the right place for the question; you want SuperUser for "How do I ..." questions that don't involve code.
But what you want to do is select a text box that's formatted the way you want default text to be, then right click it and choose Set As Default Text Box. You won't get that option if you've clicked WITHIN the text box and have an insertion cursor; in that case press ESC, then rightclick.
If you're trying to do this in code, select a text box formatted to taste then do something like this:
Sub SetMeAsDefault()
Dim oSh As Shape
Set oSh = ActiveWindow.Selection.ShapeRange(1)
With oSh
.SetShapesDefaultProperties
End With
End Sub
The shape and text box defaults are independent of master formatting, which controls only the formatting of placeholders and text within placeholders. Text/shapes inserted via the Insert ribbon/menu follow the defaults set for the presentation as I've described above. Each presentation (and template) can have its own set of defaults.

How can I control legend items through a custom button in Highcharts?

I'm looking for a way of controlling legend items through my custom button.
The button will be placed out of the canvas area.
How can I get a list of legend items, and toggle them through checkboxes?
By doing that, I can give users more spaces to see graphs.
Thanks,
Sung Am YANG
You can look at the legend item names using
chart.series[0].name
chart.series[1].name
To toggle axes on and off, use
chart.series[0].show()
chart.series[0].hide()
e.g. http://jsfiddle.net/BasRN/ shows hiding and showing the first series with buttons, including setting the button text to the series name.

Resources