Sort column high to low ignoring zeros.

TimeCreature

New Member
Joined
Sep 15, 2006
Messages
1
Can anyone let me know if this is possible and how i might achieve it
The following numbers are automatically gathered using a COUNTIF function from another sheet.
3
4
7
1
2
0
0

The above figures are located in cells C9:C15 how can i get these to automatically copy over to cells D9:D13 arranged with the highest number in D13.
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.

pgc01

MrExcel MVP
Joined
Apr 25, 2006
Messages
19,884
Hi
Welcome to the board.

This is one possible solution.

The numbers in C9:C15 are written in ascending order in D9:D15. Zeros are not displayed.

In D9:

Code:
=IF(ROW(C9)-ROW($C$9)>=COUNTIF($C$9:$C$15,"<>0"),"",INDEX($C$9:$C$15,MATCH(SMALL(IF($C$9:$C$15<>0,$C$9:$C$15),1+ROW(C9)-ROW($C$9)),$C$9:$C$15,0)))
This is an array formula and so MUST be entered with CTRL+SHIFT+ENTER and not just ENTER.
Copy down until D15

Hope this helps
PGC
 

Forum statistics

Threads
1,136,309
Messages
5,674,996
Members
419,541
Latest member
freddyboots

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
Top