SOLVED

# Using checkboxes to create percentage bar

Copper Contributor

# Using checkboxes to create percentage bar

I've seen that you can use Excel to create a percentage bar when using checkboxes. However, is there a way to assign a specific percentage to each check box rather than dividing it by the total number of boxes?

We work on projects and some tasks take a longer amount of time to complete than other tasks and as such may account for 60%, the next, say 20% and a further two boxes each 10%, for example. Is this  possible to achieve, even if it means using hidden cells or figures on another sheet within the workbook?

Thanks, Craig

8 Replies

# Re: Using checkboxes to create percentage bar

Is this the sort of thing you require?

This is just a conditional format, but maybe you have some other strategy for your progress bar?

My checkboxes simply return TRUE or FALSE but the percentage is calculated in the formatted cell using

``= SUM(checkMarks * {60;20;10;10}%)``

# Re: Using checkboxes to create percentage bar

@Peter Bartholomew Thanks.

I've attached a copy of what it is that I'm working with as we literally have hundred of rows for some projects and as such struggled to implement your suggestion, unless I'm missing something? I've now added the percentages in the cells adjacent for my reference and also to possibly assist with a formula?

best response confirmed by CraigPauley (Copper Contributor)
Solution

# Re: Using checkboxes to create percentage bar

Including the values on the worksheet to give an alternating pattern is a step backward because it makes any calculation harder.  The formula I would use is

``= BYROW(status * {60,20,10,10,10}%, LAMBDA(x, SUM(x)))``

which spills to return the entire column of overall percentages.

[Look out for the new checkboxes when the come available; they are much better to set up and use]

# Re: Using checkboxes to create percentage bar

@Peter Bartholomew that's fantastic thanks. I did manage to make it work by putting in the values in the cell adjacent, however, now its in my spreadsheet I can see exactly what you mean and its a really clean way of doing it so I'll be updating the sheets with now.

# Re: Using checkboxes to create percentage bar

I am pleased that the ideas may be of some value to you.  If you miss the information provided by the percentage weightings you could insert them as a range, possibly above the headings.  Were you to do that, you could even reference the values from that range in place of using the array constant as I did.

# Re: Using checkboxes to create percentage bar

I have created the sheets for a few projects now and formulas work very well, however a couple of issues I've had is the work sheets running quite slowly due to the number of columns and rows we need, but I kind of got around this by having separate sheets rather than workbooks. The second issue is that most users will be onsite using a phone or tablet to complete the sheets and I've found that we cant use Form Control on mobile devices.
Another user has suggested using Yes/No pull down as this eliminates Form Control, then use Card View to make it more compatible. I'm happy with this, but the formula you assisted me with isn't going to work with this. Therefore, can you suggest a formula that essentially does the same thing, but works when yes is selected?

# Re: Using checkboxes to create percentage bar

I have hopes that the Insert/CellControls/CheckBox that is currently out for beta-testing on Windows machines will eventually find its was to other platforms because it is there that they are most needed.

Dropdowns can be set to work with TRUE/FALSE or 1/0, in which case they can be used directly by the existing formulas.  If you opt for "Yes"/"No" a slight modification to any dependent formula is required

``= BYROW((StatusYesNo="Yes") * {60,20,10,10,10}%, LAMBDA(x, SUM(x)))``

Note the new name was 'StatusYesNo' was introduced simply because 'Status' is still in use on the original sheet.  Something else that should happen sometime over the coming months is that it should be possible to simplify the formula to read

``= BYROW((StatusYesNo="Yes") * {60,20,10,10,10}%, SUM)``

but not yet.

# Re: Using checkboxes to create percentage bar

Thanks Peter, didn't even think about keeping it as True/False! Changed to this and it works perfectly. Even better than before, its a fraction of the size and formatting is much easier.
1 best response

Accepted Solutions
best response confirmed by CraigPauley (Copper Contributor)
Solution

# Re: Using checkboxes to create percentage bar

Including the values on the worksheet to give an alternating pattern is a step backward because it makes any calculation harder.  The formula I would use is

``= BYROW(status * {60,20,10,10,10}%, LAMBDA(x, SUM(x)))``

which spills to return the entire column of overall percentages.

[Look out for the new checkboxes when the come available; they are much better to set up and use]