+ Reply to Thread
Results 1 to 3 of 3

Array formula to remove blanks (like autofilter)

Hybrid View

  1. #1
    Registered User
    Join Date
    03-11-2010
    Location
    Austin, TX
    MS-Off Ver
    Excel 2003, 2010
    Posts
    17

    Array formula to remove blanks (like autofilter)

    Hey everyone,

    I've been trying to figure out what I believe is a simple problem but I can't get it right. Attached is a sample spreadsheet that will hopefully illustrate my goal more clearly.

    I have several customers that order various items. However, they do not all order the same things nor do they all receive the same prices due to volume, etc. So what I'm trying to do is that when I select the customer in cell J3, that columns I and J fill with the non-blanks from the table in B4:E19. My assumption is that the items will have to be referenced from the costs but I'm not totally sure about that since there would are non-unique prices.

    This is essentially an auto-filter problem without using the built-in function but I swear I've had something like this set up before. Thanks for any help.
    Attached Files Attached Files
    Last edited by CST; 02-13-2012 at 12:53 PM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Array formula to remove blanks (like autofilter)

    Try in I4:

    =LOOKUP(REPT("z",255),CHOOSE({1,2},"",INDEX($B$5:$B$19,SMALL(IF(INDEX($C$5:$E$19,0,MATCH($J$3,$C$4:$E$4,0))<>"",ROW($B$5:$B$19)-ROW($B$5)+1),ROWS($I$4:$I4)))))
    confirmed with CTRL+SHIFT+ENTER not just ENTER and copy down.

    In J4:

    =IF(I4="","",SUMIF($B$5:$B$19,I4,INDEX($C$5:$E$19,0,MATCH($J$3,$C$4:$E$4,0))))
    confirmed with just ENTER and copied down.
    Attached Files Attached Files
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    03-11-2010
    Location
    Austin, TX
    MS-Off Ver
    Excel 2003, 2010
    Posts
    17

    Re: Array formula to remove blanks (like autofilter)

    Many thanks. That's exactly what I was trying to get at.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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