Looking for Assistance with Formula (Top 30 Values Closest to ZERO) Please :)

Iccreamann21

New Member
Joined
Sep 25, 2013
Messages
48
Office Version
  1. 365
Platform
  1. Windows
[TABLE="class: grid, width: 100, align: center"]
<tbody>[TR]
[TD]1[/TD]
[TD][TABLE="width: 139"]
<tbody>[TR]
[TD="class: xl67, width: 139"]-0.14[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]top 30 values in column B1-B32 that is closest to 0[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD][TABLE="width: 139"]
<tbody>[TR]
[TD="class: xl67, width: 139"]-0.04[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]I want to project it as a formula in C1-C30[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD][TABLE="width: 139"]
<tbody>[TR]
[TD="class: xl67, width: 139"]-0.02[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD][TABLE="width: 139"]
<tbody>[TR]
[TD="class: xl67, width: 139"]0.09[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD][TABLE="width: 139"]
<tbody>[TR]
[TD="class: xl67, width: 139"]0.23[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD][TABLE="width: 139"]
<tbody>[TR]
[TD="class: xl67, width: 139"]-0.12[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD][TABLE="width: 139"]
<tbody>[TR]
[TD="class: xl67, width: 139"]0.21[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD][TABLE="width: 139"]
<tbody>[TR]
[TD="class: xl67, width: 139"]0.2[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD][TABLE="width: 139"]
<tbody>[TR]
[TD="class: xl67, width: 139"]0.04[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD][TABLE="width: 139"]
<tbody>[TR]
[TD="class: xl67, width: 139"]0.07[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]11[/TD]
[TD][TABLE="width: 139"]
<tbody>[TR]
[TD="class: xl67, width: 139"]-0.03[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]12[/TD]
[TD][TABLE="width: 139"]
<tbody>[TR]
[TD="class: xl67, width: 139"]-0.07[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]13[/TD]
[TD][TABLE="width: 139"]
<tbody>[TR]
[TD="class: xl67, width: 139"]-0.02[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]14[/TD]
[TD][TABLE="width: 139"]
<tbody>[TR]
[TD="class: xl67, width: 139"]0.01[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]15[/TD]
[TD][TABLE="width: 139"]
<tbody>[TR]
[TD="class: xl67, width: 139"]0.02[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]16[/TD]
[TD][TABLE="width: 139"]
<tbody>[TR]
[TD="class: xl67, width: 139"]0.08[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]17[/TD]
[TD][TABLE="width: 139"]
<tbody>[TR]
[TD="class: xl67, width: 139"]-0.15[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]18[/TD]
[TD][TABLE="width: 139"]
<tbody>[TR]
[TD="class: xl67, width: 139"]0.17[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]19[/TD]
[TD][TABLE="width: 139"]
<tbody>[TR]
[TD="class: xl67, width: 139"]0.33[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]20[/TD]
[TD][TABLE="width: 139"]
<tbody>[TR]
[TD="class: xl67, width: 139"]-0.16[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]21[/TD]
[TD][TABLE="width: 139"]
<tbody>[TR]
[TD="class: xl67, width: 139"]0.02[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]22[/TD]
[TD][TABLE="width: 139"]
<tbody>[TR]
[TD="class: xl67, width: 139"]0.05[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]23[/TD]
[TD]0[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]24[/TD]
[TD][TABLE="width: 139"]
<tbody>[TR]
[TD="class: xl67, width: 139"]-0.07[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]25[/TD]
[TD][TABLE="width: 139"]
<tbody>[TR]
[TD="class: xl67, width: 139"]0.04[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]26[/TD]
[TD][TABLE="width: 139"]
<tbody>[TR]
[TD="class: xl67, width: 139"]0.03[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]27[/TD]
[TD][TABLE="width: 139"]
<tbody>[TR]
[TD="class: xl67, width: 139"]0.06[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]28[/TD]
[TD][TABLE="width: 139"]
<tbody>[TR]
[TD="class: xl67, width: 139"]-0.02[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]29[/TD]
[TD][TABLE="width: 139"]
<tbody>[TR]
[TD="class: xl67, width: 139"]-0.05[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]30[/TD]
[TD][TABLE="width: 139"]
<tbody>[TR]
[TD="class: xl67, width: 139"]0.06[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]31[/TD]
[TD][TABLE="width: 139"]
<tbody>[TR]
[TD="class: xl67, width: 139"]0.01[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]32[/TD]
[TD][TABLE="width: 139"]
<tbody>[TR]
[TD="class: xl67, width: 139"]-0.03[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 
Last edited:
The first one is because that is the closest to 0 as it is equal to 0, then the last is because of multiplying by the SIGN of 0 :-)
 
Upvote 0

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Let me suggest 2 other approaches. If you want a formula, try:


Book1
BC
1-0.140
2-0.040.01
3-0.020.01
40.09-0.02
50.23-0.02
6-0.120.02
70.210.02
80.2-0.02
90.04-0.03
100.070.03
11-0.03-0.03
12-0.07-0.04
13-0.020.04
140.010.04
150.020.05
160.08-0.05
17-0.150.06
180.170.06
190.330.07
20-0.16-0.07
210.02-0.07
220.050.08
2300.09
24-0.07-0.12
250.04-0.14
260.03-0.15
270.06-0.16
28-0.020.17
29-0.050.2
300.060.21
310.010.23
32-0.030.33
Sheet12
Cell Formulas
RangeFormula
C1{=INDEX(B:B,MOD(SMALL(MMULT(--(ABS(B$1:B$32)>TRANSPOSE(ABS(B$1:B$32))),ROW(B$1:B$32)^0)*100+ROW(B$1:B$32),ROWS($C$1:$C1)),100))}
Press CTRL+SHIFT+ENTER to enter array formulas.


Second, put =ABS(B1) in C1. Copy down to C32. Then sort columns B:C by column C in ascending order. Column B should give you what you want. Of course, you can copy your range somewhere else to do this if you want to keep your original list as is.
 
Upvote 0
Solution

Forum statistics

Threads
1,224,823
Messages
6,181,182
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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