Comparaing a column of values to the previous value

tony0217

Board Regular
Joined
Aug 31, 2012
Messages
134
I have a list of values in column A, or any other column if you have the time. but just column A would suffice.
I would like to compare value A1 to value A2 to see if the two values are within a certain range of each other. For example, if If I set the "within" range to be at 20:
if the value of column A1 is 20 and A2 is 19 or 22, output yes in Column B because the value is within a range of 20, if not then output no.
and so forth all the way down the column. What would be the best formula to get this done?
Comparing from the cell before it.
so comparing a1 to a2, a2 to a3 and so on..

Code:
[TABLE="width: 64"]
<tbody>[TR]
[TD="class: xl63, width: 64"]82  No[/TD]
[/TR]
[TR]
[TD="class: xl63"]26  Yes[/TD]
[/TR]
[TR]
[TD="class: xl63"]24[/TD]
[/TR]
[TR]
[TD="class: xl63"][/TD]
[/TR]
</tbody>[/TABLE]
 
Last edited:

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.

Forum statistics

Threads
1,214,875
Messages
6,122,042
Members
449,063
Latest member
ak94

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