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

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
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
 
Upvote 0

Forum statistics

Threads
1,215,013
Messages
6,122,690
Members
449,092
Latest member
snoom82

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