# Sort column high to low ignoring zeros.

#### TimeCreature

##### New Member
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

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
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

Replies
23
Views
1K
Replies
9
Views
2K
Replies
1
Views
176
Replies
1
Views
415
Replies
7
Views
590

1,219,812
Messages
6,150,367
Members
450,955
Latest member
rose8693

### 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.

### Which adblocker are you using?

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

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