array iteration problem

r1998

Board Regular
Joined
Sep 9, 2018
Messages
106
Dear friends and respected seniors,
I have the following data in column A, starting from A2
100
200
250
300
100
350
550
400

What I am trying to do is I compare A2 with A3 . If A3<=A2+100 , then compare A2 with A4 and so on......
If A3>=A2+100 , use that cell instead of A2 and compare with the lower cells.....means compare A3 and A4 and so on
i have used this formula in column B
Code:
= IF( A3>=A2+100,A3,"")
and this in column c
Code:
= IF( A3>=$A$2+100,A3,"")
but i am getting incorrect results. :(
this is the link of screenshot of my excel sheet
http://tinypic.com/r/24o0j6a/9
9

I have manually entered the required results in column D.
9

Can anyone please kindly guide me as to how I can achieve the results of column D.
Awaiting your replies.
Thank you. :)
 
Thank you Aladin Akyurek for the correct answer (y)
Thank you Peter_SSs for the correct answer (y)
Both the formulas worked perfectly (y)
 
Upvote 0

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.

Forum statistics

Threads
1,216,178
Messages
6,129,326
Members
449,501
Latest member
Amriddin

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