+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    Forum Contributor
    Join Date
    11-26-2008
    Location
    UK
    Posts
    103

    Sorting numbers with #div/0! in column

    Hi,

    I have some numbers in a column which due to other cells not yet being filled in are returning a supressed #div/0! error. This is fine, but when i go to sort the column it puts them in the wrong order.

    If it helps out any, I would like to record a macro, and assign it to the column header in order to sort the column.

    Thanks
    Last edited by Barking_Mad; 10-20-2009 at 09:23 AM.

  2. #2
    Forum Guru zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    Excel 2007
    Posts
    5,740

    Re: Sorting numbers with #div/0! in column

    Can you uplaod example and clearify how you want them to be ordered!
    "Relax. What is mind? No matter. What is matter? Never mind!"

  3. #3
    Forum Moderator Richard Buttrey's Avatar
    Join Date
    02-15-2008
    Location
    Grappenhall, UK
    MS-Off Ver
    Excel for Windows & Mac - all versions.
    Posts
    5,826

    Re: Sorting numbers with #div/0! in column

    Hi,

    You don't say what the 'right' order should be. Do you want to ignore the div/0 values, sort them all to the top, or bottom or what?

    Rgds
    Richard Buttrey

    If this was useful then please rate it appropriately.

    Click the small star icon at the bottom left of my post.

  4. #4
    Forum Guru Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007
    Posts
    3,441

    Re: Sorting numbers with #div/0! in column

    You can avoid this by nesting your division formula in the IF function and return a value of zero in place of division errors.

    =IF(ISERROR(A2/B2),0,A2/B2)

    You should get correct sort results with a valid number in the cell.
    Palmetto

    Do you know . . . ?

    You can leave feedback and add to the reputation of all who contributed a helpful response to your solution by clicking the star icon located at the left in one of their post in this thread.

  5. #5
    Forum Contributor
    Join Date
    11-26-2008
    Location
    UK
    Posts
    103

    Re: Sorting numbers with #div/0! in column

    Hi,

    Sorry I would like to put all the #div/0! errors below the numbers that are being correctly sorted.

    So it would look like..

    67.54
    45.34
    22.90
    3.76
    2.79
    #div/0!
    #div/0!
    #div/0!

  6. #6
    Forum Contributor
    Join Date
    11-26-2008
    Location
    UK
    Posts
    103

    Re: Sorting numbers with #div/0! in column

    Quote Originally Posted by Palmetto View Post
    You can avoid this by nesting your division formula in the IF function and return a value of zero in place of division errors.

    =IF(ISERROR(A2/B2),0,A2/B2)

    You should get correct sort results with a valid number in the cell.
    Hi, thanks that works just super

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.2.0