I have a fun one, and it is racking my brain to find a good solution.
I created a calculator for work, which works beautifully. But there is one little draw back that is now coming into play. It is a calculator to calculate run lengths for tape light, and it can calculate multiples at once and do them accurately.
You will see in the bottom left a box that says "INCLUDE CUT(S) AT SPECIFIC LENGTHS". What this means is, you can type in an overall requested length toward the top, but you can choose some of that requested length be cut at very specific cuts (like 50 inches or something). The only drawback is, if the "specific cuts" total length exceeds the requested length, you can end up with some negative results in some fields, and we don't want that. So I used data validation to prevent that.
However, I recently decided that it would be helpful if there was a checkbox where, when checked, the "requested length" would just be what the "specific lengths" are, and that way you could just type in specific lengths (if that is all you have, and there is no long length requested, just a few small ones). It would be a nice feature. However, the problem is, when you check it and type in specific lengths, everything works fine, but then when you UNCHECK it, the specific lengths now exceed the requested length (which is zero). And you have the same problem I was trying to avoid.
I tried applying Data Validation to the cell that the checkbox is connected to, but it won't prevent you from unchecking the check box if the result is that the specific lengths exceed the requested length. I basically need a checkbox (or some good alternative) where I can select one thing or another, but be prevented from doing one of those things if it causes an issue -- such as "the sum of C19:C23 is greater than D10" (the specific thing I want to avoid).
You will see I already have data validation applied to the cell (B17) in question. And it works if I try to type in the cell. But if I use the checkbox to change it, it allows it to go through, and mess things up.
Can someone help me with this? I am trying hard to explain it, but I know this calculator may be too confusing to summarize and explain in such a short text box. I am simply trying to prevent unchecking a checkbox through Data Validation. And if that is impossible, is there any alternative to a checkbox that will function similarly, and also be something that I can place perameters around, where it cannot be flipped back to the other option if it causes "X" to happen?
Thank you so much for your help.
Bookmarks