formula to find which Number has reduced?

snjpverma

Well-known Member
Joined
Oct 2, 2008
Messages
1,585
Office Version
  1. 365
Platform
  1. Windows
45 62 50 82 112

In a row, there are numbers stretching from Let's say (A1 to A10). I would like the output result to be the number which has reduced.
In above example, the result should be 50 because when we go from left to right, 50 is a reduction. From 62 it went down to 50.
Any suggestion?

<tbody>
</tbody><colgroup><col></colgroup>
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Maybe:

AB

<tbody>
[TD="align: center"]1[/TD]
[TD="align: right"]45[/TD]
[TD="align: right"]50[/TD]

[TD="align: center"]2[/TD]
[TD="align: right"]62[/TD]
[TD="align: right"]11[/TD]

[TD="align: center"]3[/TD]
[TD="align: right"]50[/TD]
[TD="align: right"][/TD]

[TD="align: center"]4[/TD]
[TD="align: right"]82[/TD]
[TD="align: right"][/TD]

[TD="align: center"]5[/TD]
[TD="align: right"]11[/TD]
[TD="align: right"][/TD]

</tbody>
Sheet2

[TABLE="width: 85%"]
<tbody>[TR]
[TD]Worksheet Formulas[TABLE="width: 100%"]
<tbody>[TR="bgcolor: #DAE7F5"]
[TH]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
[TR]
[TH="bgcolor: #DAE7F5"]B2[/TH]
[TD="align: left"]=LOOKUP(2,1/(A2:A5< A1:A4),A2:A5)[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]

[TABLE="width: 85%"]
<tbody>[TR]
[TD]Array Formulas[TABLE="width: 100%"]
<tbody>[TR="bgcolor: #DAE7F5"]
[TH]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
[TR]
[TH="bgcolor: #DAE7F5"]B1[/TH]
[TD="align: left"]{=INDEX(A2:A5,MIN(IF(A2:A5-A1:A4<0,ROW(A2:A5)-ROW(A2)+1)))}[/TD]
[/TR]
</tbody>[/TABLE]
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself[/TD]
[/TR]
</tbody>[/TABLE]



The B1 formula will find the first time a number is less than the row above, the B2 formula finds the last time a number is less than the row above. If you're sure it can only happen once, I'd use the B2 formula since it's shorter.
 
Last edited:
Upvote 0
I'm assuming you mean row and not column (A1:A10 is in a column).


Book1
ABCDEFGHIJK
14562508211212012516020025650
Sheet3
Cell Formulas
RangeFormula
K1{=IFERROR(INDEX($B1:$J1,MIN(IF($B1:$J1<$A1:$I1,COLUMN($B1:$J1)-COLUMN($B1)+1,COLUMN()))),"")}
Press CTRL+SHIFT+ENTER to enter array formulas.


WBD
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,175
Members
453,021
Latest member
Justyna P

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