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 :beerchug:
Thank you Peter_SSs for the correct answer :beerchug:
Both the formulas worked perfectly :beerchug:
 
Upvote 0

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.

Forum statistics

Threads
1,223,214
Messages
6,170,771
Members
452,353
Latest member
strainu

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