Conditional pass/fail statements

grazhoppa

New Member
Joined
Sep 26, 2008
Messages
1
Hi,

I've done some searches, can't seem to find anything I think is really analogous to what I'm trying to do, which seems like it should be fairly simple, even to me :eek:

First, a general question - can if statements handle "less than or equal" or "greater than or equal"? If so, are they respectively entered as <= and >=?

Now the specifics. I run tests on an instrument every morning, and need to compare the results to the established window of acceptance.

So, as in my example, I need to evaluate if the number I get, lets say 92.5, is between say, 91.5 and 92.5 (inclusive). If it passes, I don't need a result; but if it fails, I'd like to have the word "Fail" show up in the second set of columns.

I've brought the groups of columns under one another, so it will fit better here, but I can certainly adjust formulae:

<table x:str="" style="border-collapse: collapse; table-layout: fixed; width: 359pt;" width="479" border="0" cellpadding="0" cellspacing="0"><tbody><tr class="xl29" style="height: 12.75pt;" height="17"><td class="xl29" style="height: 12.75pt; width: 27pt;" width="36" height="17">A</td> <td class="xl29" style="width: 92pt;" width="123">B</td> <td class="xl29" style="width: 48pt;" width="64">C</td> <td class="xl29" style="width: 48pt;" width="64">D</td> <td class="xl29" style="width: 48pt;" width="64">E</td> <td class="xl29" style="width: 48pt;" width="64">F</td> <td class="xl29" style="width: 48pt;" width="64">
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl29" style="height: 12.75pt;" x:num="" height="17">2</td> <td class="xl26">
</td> <td class="xl24" x:num="">2000</td> <td class="xl24" x:num="">1500</td> <td class="xl24" x:num="">1000</td> <td class="xl24" x:num="">500</td> <td class="xl24">
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl29" style="height: 12.75pt;" x:num="" height="17">3</td> <td class="xl26">Min</td> <td class="xl25" x:num="92.497961264016297">92.5</td> <td class="xl25" x:num="90.620967741935488">90.6</td> <td class="xl25" x:num="91.606639839034202">91.6</td> <td class="xl25" x:num="89.182092555331991">89.2</td> <td class="xl24">
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl29" style="height: 12.75pt;" x:num="" height="17">4</td> <td class="xl26">Max</td> <td class="xl25" x:num="91.497961264016297">91.5</td> <td class="xl25" x:num="89.620967741935488">89.6</td> <td class="xl25" x:num="90.606639839034202">90.6</td> <td class="xl25" x:num="88.182092555331991">88.2</td> <td class="xl24">
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl29" style="height: 12.75pt;" x:num="" height="17">5</td> <td class="xl27" x:num="39504">2/26/2008</td> <td class="xl25" x:num="92.47">92.5</td> <td class="xl25" x:num="90.26">90.3</td> <td class="xl25" x:num="91.99">92.0</td> <td class="xl25" x:num="89.47">89.5</td> <td class="xl25">
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl29" style="height: 12.75pt;" x:num="" height="17">6</td> <td class="xl27" x:num="39505">2/27/2008</td> <td class="xl25" x:num="">92.5</td> <td class="xl25" x:num="90.04">90.0</td> <td class="xl25" x:num="91.61">91.6</td> <td class="xl25" x:num="89.36">89.4</td> <td class="xl25">
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl29" style="height: 12.75pt;" x:num="" height="17">7</td> <td class="xl27" x:num="39507">2/29/2008</td> <td class="xl25" x:num="92.55">92.6</td> <td class="xl25" x:num="90.03">90.0</td> <td class="xl25" x:num="92.08">92.1</td> <td class="xl25" x:num="89.42">89.4</td> <td class="xl25">
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl29" style="height: 12.75pt;" x:num="" height="17">8</td> <td class="xl27" x:num="39511">3/4/2008</td> <td class="xl25" x:num="92.58">92.6</td> <td class="xl25" x:num="90.02">90.0</td> <td class="xl25" x:num="91.83">91.8</td> <td class="xl25" x:num="89.32">89.3</td> <td class="xl25">
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl29" style="height: 12.75pt;" x:num="" height="17">9</td> <td class="xl27" x:num="39513">3/6/2008</td> <td class="xl25" x:num="92.48">92.5</td> <td class="xl25" x:num="90.39">90.4</td> <td class="xl25" x:num="91.88">91.9</td> <td class="xl25" x:num="89.37">89.4</td> <td class="xl25">
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl29" style="height: 12.75pt;" x:num="" height="17">10</td> <td class="xl26">
</td> <td colspan="5" style="">
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl29" style="height: 12.75pt;" x:num="" height="17">11</td> <td class="xl26">
</td> <td colspan="5" style="">
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl29" style="height: 12.75pt;" x:num="" height="17">12</td> <td class="xl26">
</td> <td colspan="5" style="">
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl29" style="height: 12.75pt;" x:num="" height="17">13</td> <td class="xl28">Pass/Fail</td> <td class="xl24" x:num="">2000</td> <td class="xl24" x:num="">1500</td> <td class="xl24" x:num="">1000</td> <td class="xl24" x:num="">500</td> <td>
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl29" style="height: 12.75pt;" x:num="" height="17">14</td> <td class="xl27" x:num="39504" x:fmla="=B5">2/26/2008</td> <td colspan="4" class="xl25" style="">
</td> <td>
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl29" style="height: 12.75pt;" x:num="" height="17">15</td> <td class="xl27" x:num="39505" x:fmla="=B6">2/27/2008</td> <td colspan="4" class="xl25" style="">
</td> <td>
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl29" style="height: 12.75pt;" x:num="" height="17">16</td> <td class="xl27" x:num="39507" x:fmla="=B7">2/29/2008</td> <td colspan="4" class="xl25" style="">
</td> <td>
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl29" style="height: 12.75pt;" x:num="" height="17">17</td> <td class="xl27" x:num="39511" x:fmla="=B8">3/4/2008</td> <td colspan="4" class="xl25" style="">
</td> <td>
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl29" style="height: 12.75pt;" x:num="" height="17">18</td> <td class="xl27" x:num="39513" x:fmla="=B9">3/6/2008</td> <td colspan="4" class="xl25" style="">
</td></tr></tbody></table>

If I haven't been clear, or left information out, please let me know. Thanks for your assistance.
Graz
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Welcome to the Board!

Maybe you want this copied down and across:

=if(and(index(C$5:C$9,match($B14,B$5:B$9,))>=C$4,index(C$5:C$9,match($B14,B$5:B$9,))<=C$3),"Pass","Fail")

You can also match the column headers if they will not always be exactly lined up.

Hope that helps.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,938
Messages
6,122,346
Members
449,080
Latest member
Armadillos

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top