Testing criteria across multiple rows

HNExcel

New Member
Joined
Apr 1, 2011
Messages
2
Hi there,

This is probably a really simple question, but I have been struggling to find a solution.

The example below will help;

I am able to manually enter when the condition is met, i.e. when the value in A exceeds the previous value in B which is not equal to zero.

I want to be able to add a formula in that will do this for me, i.e. it will look at the value in A and check whether or not it is greater than the previous B which is not equal to zero...can anyone help?

<table x:str="" style="border-collapse: collapse; width: 460pt;" width="612" border="0" cellpadding="0" cellspacing="0"><col style="width: 48pt;" width="64"> <col style="width: 28pt;" span="2" width="37"> <col style="width: 328pt;" width="437"> <col style="width: 28pt;" width="37"> <tbody><tr style="height: 12.75pt;" height="17"> <td class="xl24" style="height: 12.75pt; width: 48pt;" width="64" height="17">
</td> <td class="xl25" style="border-left: medium none; width: 28pt;" width="37">A</td> <td class="xl25" style="border-left: medium none; width: 28pt;" width="37">B</td> <td class="xl25" style="border-left: medium none; width: 328pt;" width="437">Mark when A is greater than previous B which is not equal to zero</td> <td class="xl24" style="border-left: medium none; width: 28pt;" width="37">
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl24" style="border-top: medium none; height: 12.75pt;" height="17">
</td> <td class="xl26" style="border-top: medium none; border-left: medium none;" x:num="">0</td> <td class="xl26" style="border-top: medium none; border-left: medium none;" x:num="">11</td> <td class="xl26" style="border-top: medium none; border-left: medium none;">
</td> <td class="xl24" style="border-top: medium none; border-left: medium none;">
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl24" style="border-top: medium none; height: 12.75pt;" height="17">
</td> <td class="xl26" style="border-top: medium none; border-left: medium none;" x:num="">10</td> <td class="xl26" style="border-top: medium none; border-left: medium none;" x:num="">0</td> <td class="xl26" style="border-top: medium none; border-left: medium none;">
</td> <td class="xl24" style="border-top: medium none; border-left: medium none;">
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl24" style="border-top: medium none; height: 12.75pt;" height="17">
</td> <td class="xl26" style="border-top: medium none; border-left: medium none;" x:num="">8</td> <td class="xl26" style="border-top: medium none; border-left: medium none;" x:num="">0</td> <td class="xl26" style="border-top: medium none; border-left: medium none;">
</td> <td class="xl24" style="border-top: medium none; border-left: medium none;">
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl24" style="border-top: medium none; height: 12.75pt;" height="17">
</td> <td class="xl26" style="border-top: medium none; border-left: medium none;" x:num="">20</td> <td class="xl26" style="border-top: medium none; border-left: medium none;" x:num="">0</td> <td class="xl26" style="border-top: medium none; border-left: medium none;">x</td> <td class="xl24" style="border-top: medium none; border-left: medium none;">
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl24" style="border-top: medium none; height: 12.75pt;" height="17">
</td> <td class="xl26" style="border-top: medium none; border-left: medium none;" x:num="">0</td> <td class="xl26" style="border-top: medium none; border-left: medium none;" x:num="">12</td> <td class="xl26" style="border-top: medium none; border-left: medium none;">
</td> <td class="xl24" style="border-top: medium none; border-left: medium none;">
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl24" style="border-top: medium none; height: 12.75pt;" height="17">
</td> <td class="xl26" style="border-top: medium none; border-left: medium none;" x:num="">30</td> <td class="xl26" style="border-top: medium none; border-left: medium none;" x:num="">0</td> <td class="xl26" style="border-top: medium none; border-left: medium none;">x</td> <td class="xl24" style="border-top: medium none; border-left: medium none;">
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl24" style="border-top: medium none; height: 12.75pt;" height="17">
</td> <td class="xl26" style="border-top: medium none; border-left: medium none;" x:num="">20</td> <td class="xl26" style="border-top: medium none; border-left: medium none;" x:num="">0</td> <td class="xl26" style="border-top: medium none; border-left: medium none;">
</td> <td class="xl24" style="border-top: medium none; border-left: medium none;">
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl24" style="border-top: medium none; height: 12.75pt;" height="17">
</td> <td class="xl26" style="border-top: medium none; border-left: medium none;" x:num="">10</td> <td class="xl26" style="border-top: medium none; border-left: medium none;" x:num="">0</td> <td class="xl26" style="border-top: medium none; border-left: medium none;">
</td> <td class="xl24" style="border-top: medium none; border-left: medium none;">
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl24" style="border-top: medium none; height: 12.75pt;" height="17">
</td> <td class="xl26" style="border-top: medium none; border-left: medium none;" x:num="">0</td> <td class="xl26" style="border-top: medium none; border-left: medium none;" x:num="">60</td> <td class="xl26" style="border-top: medium none; border-left: medium none;">
</td> <td class="xl24" style="border-top: medium none; border-left: medium none;">
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl24" style="border-top: medium none; height: 12.75pt;" height="17">
</td> <td class="xl26" style="border-top: medium none; border-left: medium none;" x:num="">50</td> <td class="xl26" style="border-top: medium none; border-left: medium none;" x:num="">0</td> <td class="xl26" style="border-top: medium none; border-left: medium none;">
</td> <td class="xl24" style="border-top: medium none; border-left: medium none;">
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl24" style="border-top: medium none; height: 12.75pt;" height="17">
</td> <td class="xl26" style="border-top: medium none; border-left: medium none;" x:num="">70</td> <td class="xl26" style="border-top: medium none; border-left: medium none;" x:num="">0</td> <td class="xl26" style="border-top: medium none; border-left: medium none;">x</td> <td class="xl24" style="border-top: medium none; border-left: medium none;">
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl24" style="border-top: medium none; height: 12.75pt;" height="17">
</td> <td class="xl26" style="border-top: medium none; border-left: medium none;" x:num="">0</td> <td class="xl26" style="border-top: medium none; border-left: medium none;" x:num="">42</td> <td class="xl26" style="border-top: medium none; border-left: medium none;">
</td> <td class="xl24" style="border-top: medium none; border-left: medium none;">
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl24" style="border-top: medium none; height: 12.75pt;" height="17">
</td> <td class="xl26" style="border-top: medium none; border-left: medium none;" x:num="">45</td> <td class="xl26" style="border-top: medium none; border-left: medium none;" x:num="">0</td> <td class="xl26" style="border-top: medium none; border-left: medium none;">x</td> <td class="xl24" style="border-top: medium none; border-left: medium none;">
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl24" style="border-top: medium none; height: 12.75pt;" height="17">
</td> <td class="xl26" style="border-top: medium none; border-left: medium none;" x:num="">46</td> <td class="xl26" style="border-top: medium none; border-left: medium none;" x:num="">0</td> <td class="xl26" style="border-top: medium none; border-left: medium none;">
</td> <td class="xl24" style="border-top: medium none; border-left: medium none;">
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl24" style="border-top: medium none; height: 12.75pt;" height="17">
</td> <td class="xl26" style="border-top: medium none; border-left: medium none;">
</td> <td class="xl26" style="border-top: medium none; border-left: medium none;">
</td> <td class="xl26" style="border-top: medium none; border-left: medium none;">
</td> <td class="xl24" style="border-top: medium none; border-left: medium none;">
</td> </tr> </tbody></table>
 
Last edited:

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.

Forum statistics

Threads
1,224,586
Messages
6,179,710
Members
452,939
Latest member
WCrawford

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