Forum Discussion
Change an output based upon Conditional Formatting
Thank you for the quick reply. I'm not sure what I can and can't share from a confidentiality standpoint. We utilize a 2 workbook approach for each of our parts. The first workbook is a simple data table that is output by our CMM. The second workbook "maps" the data from the the 1st workbook's table into a more easily digestible format. Picture a workbook that attempts to visualize measurements around a part. The part is visualized by cross-sections on the page, and "overlaid" by the difference between the nominal value and the measured value of a feature or dimension. These values will be color-coded green, yellow, or red as they near the limits of the tolerance (via conditional formatting). A fourth conditional formatting rule will turn the cell of the value red to highlight that it is out of specification and manufacturing needs to halt until this is corrected. Some measurements may have a tolerance range of +/- 1mm, some may be +/- 1.5mm, etc. So there's not a hard-and-fast value around which I can write a single rule for the workbook. What I need is something that can search the workbook (typically 2 or 3 worksheets) and find any cells that were highlighted red, and then turn a "text flag" on the 1st worksheet from "OK to run" to "Do not run!". mathetes
You wrote: These values will be color-coded green, yellow, or red as they near the limits of the tolerance (via conditional formatting). A fourth conditional formatting rule will turn the cell of the value red to highlight that it is out of specification and manufacturing needs to halt until this is corrected. Some measurements may have a tolerance range of +/- 1mm, some may be +/- 1.5mm, etc. So there's not a hard-and-fast value around which I can write a single rule for the workbook.
And from that reference to changing colors based on how close a particular measurement gets to the tolerance limits, I assume that there's also a table with those tolerance limits, (maybe with product specific values), somewhere in this workbook. And the same for that "fourth formatting rule"--it has to be referring to a table of values......in order to do what you're describing.
So even if there's not a single hard-and-fast value, there are values specified somewhere in there...just waiting to be put to work.
- NikolinoDEJul 14, 2020Platinum ContributorYou are absolutely right .... the script should serve as a starting point for vba ... my failure not to write it down for that.
I'm not a VBA professional ... on the contrary, I am just as dependent on VBA as a beginner ... which I am in VBA too. Try to help with my ignorance. If I have insulted someone with it, please forgive me ... it was all done for good will. Beginners help beginners ... as far as possible, nothing more and nothing less.
That's why I publicly express my ignorance under my name.
Nikolino
I know I don't know anything (Socrates)