+ Reply to Thread
Results 1 to 7 of 7

How to find non-zero values and place them in the order they appear along with the name.

  1. #1
    Registered User
    Join Date
    03-20-2011
    Location
    Austin, Texas
    MS-Off Ver
    Excel 2010
    Posts
    27

    How to find non-zero values and place them in the order they appear along with the name.

    I am looking for some help. I have a sheet that lists all of the suppliers that we use (A2:A10).
    I have code that pulls the total number of reject by month for each supplier (C2:C10).
    What I would like is a formula that takes those values for the supplier and places them next to each other in columns E (see E2:E6) and does the same with the total reject values next to the applicable supplier (see F2:F6) without all of the zeros.
    I think it is some kind of index and match function but cannot figure it out. I have attached an example of what I am trying to achieve.
    Also, if at all possible, I would like to know if there is a way to auto populate a chart with those values and not the blanks that are generated (row 7 down in my example) so that my chart does not contain a bunch of blank space.

    Any help would be greatly appreciated.
    Attached Files Attached Files

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: How to find non-zero values and place them in the order they appear along with the nam

    hi IZAKK. try this array formula in E2:
    =IFERROR(INDEX($A$2:$A$10,SMALL(IF($C$2:$C$10<>0,ROW($A$2:$A$10)),ROWS(E$2:E2))-ROW($A$2)+1),"")
    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.

    if each supplier only appears once, then F2 can be:
    =IF(E2="","",VLOOKUP(E2,A:C,3,0))

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  3. #3
    Registered User
    Join Date
    03-20-2011
    Location
    Austin, Texas
    MS-Off Ver
    Excel 2010
    Posts
    27

    Re: How to find non-zero values and place them in the order they appear along with the nam

    OMG! You are the Master! Thanks! I have been racking my brain over this for hours.

    Any ideas on if there is a way to auto populate a chart with those values and not the blanks that are generated (row 7 down in my example) so that my chart does not contain a bunch of blank space.

  4. #4
    Registered User
    Join Date
    03-20-2011
    Location
    Austin, Texas
    MS-Off Ver
    Excel 2010
    Posts
    27

    Re: How to find non-zero values and place them in the order they appear along with the nam

    Hi benishiryo,

    I replied to your message but am not sure if I did it correctly because I could not find it in my sent items box. My actual file has more data but is laid out the same. Thanks again for all of your help!

  5. #5
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: How to find non-zero values and place them in the order they appear along with the nam

    you'll need 2 Named Ranges; for Column E & F. so press CTRL + F3 -> New -> Name: Supplier, Refers to:
    =$E$2:INDEX($E:$E,COUNTA($E:$E))

    repeat the steps & use Name as TotalRejects, Refers to:
    =$F$2:INDEX($F:$F,COUNTA($E:$E))

    select E1:F6 & create your chart. right-click the chart & Select Data. you should see 2 Edit buttons there. Edit both of them by changing the range to the Named Range. for eg, click Edit on the Legend Entries (Series) & you should see Series Values:
    =Sheet1!$F$2:$F$6
    retain the sheet name & the exclamation mark & change the range to the Named Range:
    =Sheet1!TotalRejects

    by the way, i don't think there's a Excel Vista? Vista is probably your Windows version. change it to Excel 2007, 2010 or 2013 (believe it's so because you uploaded an xlsx file). the version helps us identify which newer & more efficient formulas we can help you with. =)
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    03-20-2011
    Location
    Austin, Texas
    MS-Off Ver
    Excel 2010
    Posts
    27

    Re: How to find non-zero values and place them in the order they appear along with the nam

    Thanks! I updated my version of Excel.

    I don't understand the first part though. When do I press CTRL + F3? When I open the sheet? I tried it but it did not seem to do anything. Is it supposed to open an option for me to input the=$E$2:INDEX($E:$E,COUNTA($E:$E)) and=$F$2:INDEX($F:$F,COUNTA($E:$E)) formulas? I am working on a MAC could that be the issue?

  7. #7
    Registered User
    Join Date
    03-20-2011
    Location
    Austin, Texas
    MS-Off Ver
    Excel 2010
    Posts
    27

    Re: How to find non-zero values and place them in the order they appear along with the nam

    Sorry, I found it. I had to go to Insert, Name, Define on my MAC. Thanks Again for all of your help!

+ 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. [SOLVED] Find MAX values in one column (A) and place data in another column next to the MAX value
    By coach.32 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-14-2013, 09:14 PM
  2. Replies: 14
    Last Post: 04-17-2012, 05:18 PM
  3. Replies: 0
    Last Post: 04-10-2012, 12:39 PM
  4. Replies: 18
    Last Post: 01-28-2011, 05:19 PM
  5. Is there a way to place a row in numeric/alpheberical order?
    By Krystle in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 05-31-2006, 08:15 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