This one is kind of hard to explain, but I'm going to give it a shot.
Basically on this report I have been working on, a few sheets have some dimensional data. In one column there is an actual dimension and another has the drawing dimension (spec). SOmething like this:
___A________B_________C______________D_______
Actual:___ 1.1234"___ Drawing:___ 1.1000" - 1.2000"
What I want to do is set the "B1" cell interior color to be green if the actual dimension falls within the drawing spec, and red if it does not.
I know I can use a select case to get it to make the color, but what I can't figure out is how to use the entered data in D1 to change from ".1000" - .2000"" to .1000 to .2000 and then transfered into my macro as the case.
Hopfully that makes sense to someone... lol.
A couple notes. In almost all cases, how it is written in the example is exactly how it will be... with the exception of possibly only 3 decimal places instead of 4. But the " will almost always be there, and so will the - . And if it cannot be done without changing the format then I will have to skip on this one b/c it is more important to have the units in the cell than to have the background color.
Basically on this report I have been working on, a few sheets have some dimensional data. In one column there is an actual dimension and another has the drawing dimension (spec). SOmething like this:
___A________B_________C______________D_______
Actual:___ 1.1234"___ Drawing:___ 1.1000" - 1.2000"
What I want to do is set the "B1" cell interior color to be green if the actual dimension falls within the drawing spec, and red if it does not.
I know I can use a select case to get it to make the color, but what I can't figure out is how to use the entered data in D1 to change from ".1000" - .2000"" to .1000 to .2000 and then transfered into my macro as the case.
Hopfully that makes sense to someone... lol.
A couple notes. In almost all cases, how it is written in the example is exactly how it will be... with the exception of possibly only 3 decimal places instead of 4. But the " will almost always be there, and so will the - . And if it cannot be done without changing the format then I will have to skip on this one b/c it is more important to have the units in the cell than to have the background color.
Last edited: