+ Reply to Thread
Results 1 to 8 of 8

Ignore Blank, zeros in a range sort

  1. #1
    Registered User
    Join Date
    05-03-2013
    Location
    NE Ohio
    MS-Off Ver
    Excel Office 365
    Posts
    12

    Post Ignore Blank, zeros in a range sort

    I am using this formula to pick unique values from Day_1 range.
    It grabs blank cells and well as a zero.

    {=INDEX(Day_1,MATCH(0,COUNTIF($A$72:$A72,Day_1),0))}

    How can I modify this formula to give the uniques values, excluding the blanks, zeros and if possible the #N/A.

    Attached is the example file
    Attached Files Attached Files

  2. #2
    Banned User!
    Join Date
    10-14-2006
    Posts
    1,211

    Re: Ignore Blank, zeros in a range sort

    Try this:

    =LOOKUP("zzzz",CHOOSE({1,2},"",INDEX(Day_1,SMALL(IF(ISTEXT(Day_1),IF(Day_1<>" ",IF(MATCH(Day_1&"",Day_1&"",)=ROW(Day_1)-ROW($A$1)+1,MATCH(Day_1&"",Day_1&"",)))),ROWS(A$1:A1)))))

    Array formula: Press Ctrl+Shift+Enter, not just Enter
    copy down as far as needed

  3. #3
    Registered User
    Join Date
    05-03-2013
    Location
    NE Ohio
    MS-Off Ver
    Excel Office 365
    Posts
    12

    Re: Ignore Blank, zeros in a range sort

    Well . . . Thanks for the formula it works great in the example workbook.
    When I put it in the target workbook it returns a null for everything. Both the target workbook and the example workbook were created on the same pc with the same occurance of excel (2003).
    I modified the example workbook to include some extra columns to make it look more like the target workbook and it works great. I placed the worksheet from the excel workbook into a new worksheet in the target workbook and it returns a null.
    When I trace the formula the results are identical between the workbooks except for the last step. The example workbook yields the proper text and the target yields a null. both with no errors.
    I also tried this on another computer with another occurance of excel (2010 vs 2003). Same results.
    What could possibly be preventing one from working?

    JPS

  4. #4
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,710

    Re: Ignore Blank, zeros in a range sort

    Pl see attached file.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    05-03-2013
    Location
    NE Ohio
    MS-Off Ver
    Excel Office 365
    Posts
    12

    Re: Ignore Blank, zeros in a range sort

    When I open the Example ans sheet I get a #NAME? error in the target areas.
    I will poke around this weekend and see if I can find what is the cause of the errorr
    Thanks for the help
    JPS

  6. #6
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,710

    Re: Ignore Blank, zeros in a range sort

    It is an array formula.After pasting or editing formula Press Ctrl+Shift+Enter keys together.If still trouble exists post the file.

  7. #7
    Registered User
    Join Date
    05-03-2013
    Location
    NE Ohio
    MS-Off Ver
    Excel Office 365
    Posts
    12

    Re: Ignore Blank, zeros in a range sort

    I am still unable to get the sort formula ({=LOOKUP("zzzz",CHOOSE({1,2},"",INDEX(Day_1,SMALL(IF(ISTEXT(Day_1),IF(Day_1<>" ",IF(MATCH(Day_1&"",Day_1&"",)=ROW(Day_1)-ROW($AJ$5)+1,MATCH(Day_1&"",Day_1&"",)))),ROWS(AJ$5:AJ6))))))}to work in the Cal Data tab. It works fine on the example tab. If I insert a column and do a copy from Day_1 to the new column, paste special values only then it works (after adjusting formula for the new target area)
    I am trying to create a calendar and I do not want to use macros if possible.

    I have included the entire sheet.

    Any help with this issue is greatly apprciated.

    JPS
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    05-03-2013
    Location
    NE Ohio
    MS-Off Ver
    Excel Office 365
    Posts
    12

    Smile Re: Ignore Blank, zeros in a range sort

    Thanks for all your help. I have the data sorted and stacked. Now to build the calendar.

+ Reply to Thread

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.6.0 RC 1