+ Reply to Thread
Results 1 to 11 of 11

Return list with non-zero and non-blank values from a range with multiple columns

  1. #1
    Registered User
    Join Date
    08-16-2021
    Location
    estonia
    MS-Off Ver
    2016
    Posts
    5

    Return list with non-zero and non-blank values from a range with multiple columns

    Hello

    I am new here and I already found a thread with similar issue, but I want it a bit different solution.

    My purpose is to make a list of items and each item have amount of quantity required to buy. By default their value is 0 until I increase it. And there is another section of data which makes summary of long list by displaying only these items which required amount>0.

    I have uploaded a file which displays which result I want. I found a formula, which reveals only values of quantities, but I also want right item name on front of this value.

    Olavi
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,411

    Re: Return list with non-zero and non-blank values from a range with multiple columns

    Welcome to the forum.

    In F4:

    =IFERROR(INDEX($A$1:$A$10,SMALL(IF($B$3:$B$10>0,ROW($B$3:$B$9),""),ROW(B1))),"")

    In G4:

    =IFERROR(INDEX($B$1:$B$10,SMALL(IF($B$3:$B$10>0,ROW($B$3:$B$9),""),ROW(B1))),"")

    In H4:

    =IFERROR(INDEX($C$1:$C$10,SMALL(IF($B$3:$B$10>0,ROW($B$3:$B$9),""),ROW(B1))),"")
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,147

    Re: Return list with non-zero and non-blank values from a range with multiple columns

    In F4

    =IFERROR(INDEX($A$4:$A$9,AGGREGATE(15,6,(ROW($A$4:$A$9)-ROW($A$4)+1)/($B$4:$B$9>0),ROWS($1:1))),"")

    in G4

    =IF($F4="","",VLOOKUP($F4,$A$4:$C$9,2,FALSE))

    in H4

    =IF($G4="","",VLOOKUP($F4,$A$4:$C$9,3,FALSE))

  4. #4
    Registered User
    Join Date
    08-16-2021
    Location
    estonia
    MS-Off Ver
    2016
    Posts
    5

    Re: Return list with non-zero and non-blank values from a range with multiple columns

    Wow, both solutions works. I was so close but still too far from Ali's solution. I am not familiar with Excel code at all, but now it looks logic.

    Thank you very much, Ali and John! Have a nice day! I can use that small code now to organize my work a bit.

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,411

    Re: Return list with non-zero and non-blank values from a range with multiple columns

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

  6. #6
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    Taiwan
    MS-Off Ver
    365 V2403 and WPS V2022
    Posts
    3,380

    Re: Return list with non-zero and non-blank values from a range with multiple columns

    Cell F4 formula , Drag down and across

    HTML Code: 
    If you have 365, one formula solves all

    Cell F4 formula

    HTML Code: 

  7. #7
    Registered User
    Join Date
    08-16-2021
    Location
    estonia
    MS-Off Ver
    2016
    Posts
    5

    Re: Return list with non-zero and non-blank values from a range with multiple columns

    wk9128 - nice, only 1 formula needed. Works, thanks!

    I use office 2016.

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,411

    Re: Return list with non-zero and non-blank values from a range with multiple columns

    If you have FILTER, then you do NOT have Excel 2016. It's only available in MS365, so please update your profile accordingly.

  9. #9
    Registered User
    Join Date
    08-16-2021
    Location
    estonia
    MS-Off Ver
    2016
    Posts
    5

    Re: Return list with non-zero and non-blank values from a range with multiple columns

    Hello

    I have one more question. Since there are like 800 items in long list and I can filter these by their quantity, can I now remove items from short list by editing or resetting quantity of correspondent item in the long list?

    Example: I needed 22 pcs of Item6. I bought that amount and now I want to set its amount back to 0. It can be much easier to find Item6 from filtered list instead of searching item from long list.

    Can I do this somehow? Excel 2016.
    Attached Files Attached Files

  10. #10
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,147

    Re: Return list with non-zero and non-blank values from a range with multiple columns

    If you want to re-rest column B back to zero you will need VBA to do this: plus I suspect your sample is an over-simplification of your real situation.

  11. #11
    Registered User
    Join Date
    08-16-2021
    Location
    estonia
    MS-Off Ver
    2016
    Posts
    5

    Re: Return list with non-zero and non-blank values from a range with multiple columns

    John, I was afraid that its not so easy anymore. VBA seems easy, but I prefer to use excel online and it seems it does not have support of VBA.

    I can do my work with that way too. I dont need to use it every day and can find items by their unique product code.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Return list with non-blank values from a range with multiple columns
    By MikeBR in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 07-18-2020, 07:27 AM
  2. Return all non blank cells in multiple ranges as a list.
    By dbl_dbl in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-27-2020, 06:31 PM
  3. Replies: 3
    Last Post: 08-07-2018, 10:14 AM
  4. [SOLVED] Return non-blank Cells from multiple columns
    By gpills in forum Excel General
    Replies: 13
    Last Post: 07-16-2017, 10:56 PM
  5. Formula to return values in list from multiple columns
    By csunilkumar in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-12-2014, 04:29 AM
  6. Replies: 3
    Last Post: 12-13-2013, 06:23 AM
  7. Replies: 10
    Last Post: 02-19-2013, 12:05 PM

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