+ Reply to Thread
Results 1 to 15 of 15

Multiple index+match formulas to get non-zero value data from column and return row value

Hybrid View

  1. #1
    Registered User
    Join Date
    03-03-2013
    Location
    Chicago, IL
    MS-Off Ver
    Office 365
    Posts
    17

    Multiple index+match formulas to get non-zero value data from column and return row value

    I am trying to organize data by business unit, by creating a tab for each business unit. The current data is in a table that has various other business units. The goal is to create a new tab for each business unit then use formulas to bring in data that is non-zero value.

    Table where data coming from:
    sample.png

    Table where data should go to:
    sample2.png

    Example, if I'm creating table for "DI" business unit, the various formulas should be able to do the following:
    - go to column "DI"
    - go down until you hit any value that is non-zero
    - return the "month" in the month column
    - return the "client" in the customer column
    - return the "project" in the project column
    - return the value in the backlog column
    - then continue to look further down the column for the next set of data that is non-zero until the column/range is complete

    Any help is greatly appreciated! Thanks in advance!
    Attached Files Attached Files
    Last edited by excel-lent13; 10-03-2018 at 10:38 AM.

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,408

    Re: Need Help with a Complex Formula

    It would help if you attached a sample Excel workbook, rather than a picture of one (which I can't read on my monitor !).

    To do this, click on Go Advanced (below the Edit Window) while you are composing a reply, then scroll down to and click on Manage Attachments and the Upload window will open. Click on Browse and navigate to (and double-click) the file icon that you want to attach, then click on Upload and then on Close this Window to return to the Edit window. When you have finished composing your post, click on Submit Post. Don't try to use the Paperclip icon, as it is broken on this forum.

    Hope this helps.

    Pete

  3. #3
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: Need Help with a Complex Formula

    Also...

    Administrative Note:
    • We would love to continue to help you with your query, but first, before we can proceed…
    • Please see Forum Rule #1 about proper thread titles and adjust accordingly...
    HTH
    Regards, Jeff

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,408

    Re: Multiple index+match formulas to get non-zero value data from column and return row va

    If this was just for DI, then you could use a helper column in the Raw Data sheet (e.g. column S), with this formula in S2:

    =IF(Backlog[[#This Row],[DI]]=0,"-",MAX(S$1:S1)+1)

    then copy this down to the bottom of your data. Then in the DI_summary sheet, you could put this formula in C5:

    =IFERROR(INDEX('Raw Data'!A:A,MATCH(ROWS($1:1),'Raw Data'!$S:$S,0)),"")

    You could copy this into D5:E5, but I'm not sure where the data for columns F or G is expected to come from. Then copy those formulae down as far as is necessary. If you want just the 3-letter month in column C, you would put RIGHT( … ,3) around the formula in C5.

    You could repeat this for the other business units, where you could copy the headings from E1:M1 of the Raw Data sheet across to Q1 (which is why my helper was in S2) and then have similar formulae for those helper columns. The formula in each summary sheet will be very similar to that posted above, although the second range (shown in red above) would need to be changed to suit the appropriate helper.

    Hope this helps.

    Pete

  5. #5
    Registered User
    Join Date
    03-03-2013
    Location
    Chicago, IL
    MS-Off Ver
    Office 365
    Posts
    17

    Re: Multiple index+match formulas to get non-zero value data from column and return row va

    Pete -

    The if formula didn't quite work properly as it resulted in a "1" when there was a value instead of the value itself from the backlog table. I have attached the sample file again and hardcoded the DI Summary tab to show how the results of the formula should show. The iferror worked well to return the months however not sure how to apply them for the other columns. See if you can replicate the hardcoded text in the DI Summary tab using formulas and I can update the formulas for the other product lines. Greatly appreciate your help!
    Attached Files Attached Files

  6. #6
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,408

    Re: Multiple index+match formulas to get non-zero value data from column and return row va

    Quote Originally Posted by excel-lent13 View Post
    ... See if you can replicate the hardcoded text in the DI Summary tab using formulas and I can update the formulas for the other product lines...
    The file you posted has exactly the same results as mine - see attached. The formula in column F needs to have the column ref adjusted to suit the DI column.

    Hope this helps.

    Pete
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    03-03-2013
    Location
    Chicago, IL
    MS-Off Ver
    Office 365
    Posts
    17

    Re: Multiple index+match formulas to get non-zero value data from column and return row va

    Quote Originally Posted by Pete_UK View Post
    The file you posted has exactly the same results as mine - see attached. The formula in column F needs to have the column ref adjusted to suit the DI column.

    Hope this helps.

    Pete
    Nevermind Glenn, Pete's file works with negative values. Thank you Pete!

  8. #8
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Multiple index+match formulas to get non-zero value data from column and return row va

    In C5, copied across and down:

    =IFERROR(INDEX('Raw Data'!A:A,AGGREGATE(15,6,ROW(Backlog[[DI]:[DI]])/(Backlog[[DI]:[DI]]>0),ROWS($1:1))),"")

    In F5, copied down:

    =IFERROR(INDEX('Raw Data'!G:G,AGGREGATE(15,6,ROW(Backlog[[DI]:[DI]])/(Backlog[[DI]:[DI]]>0),ROWS($1:1))),"")
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  9. #9
    Registered User
    Join Date
    03-03-2013
    Location
    Chicago, IL
    MS-Off Ver
    Office 365
    Posts
    17

    Re: Multiple index+match formulas to get non-zero value data from column and return row va

    Glenn - you are absolutely a genius! Thank you for updating the file.

    Pete - Thank you to you as well!

  10. #10
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,259

    Re: Multiple index+match formulas to get non-zero value data from column and return row va

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.
    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. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  11. #11
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Multiple index+match formulas to get non-zero value data from column and return row va

    Not really... I've just done it before!!

    You're welcome.



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

    It'd also be appreciated if you were to click the Add Reputation button at the foot of any of the posts of all members who helped you reach a solution.

  12. #12
    Registered User
    Join Date
    03-03-2013
    Location
    Chicago, IL
    MS-Off Ver
    Office 365
    Posts
    17

    Re: Multiple index+match formulas to get non-zero value data from column and return row va

    Glenn - any way to modify the formula so it picks up negatives as well? Basically, it needs to pick up non-zeros. Below is what you currently have:

    IFERROR(INDEX('Raw Data'!A:A,AGGREGATE(15,6,ROW(Backlog[[DI]:[DI]])/(Backlog[[DI]:[DI]]>0),ROWS($1:1))),"")

  13. #13
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Multiple index+match formulas to get non-zero value data from column and return row va

    Try:

    IFERROR(INDEX('Raw Data'!A:A,AGGREGATE(15,6,ROW(Backlog[[DI]:[DI]])/(Backlog[[DI]:[DI]]<>0),ROWS($1:1))),"")

    Failing that, post a sample sheet. I'm away for the night, now.

  14. #14
    Registered User
    Join Date
    03-03-2013
    Location
    Chicago, IL
    MS-Off Ver
    Office 365
    Posts
    17

    Re: Multiple index+match formulas to get non-zero value data from column and return row va

    return value of a negative number is a zero. See attached file.
    Attached Files Attached Files

+ 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. COMPLEX FORMULA PLEASE ? :s
    By joelabar in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-19-2017, 02:48 PM
  2. [SOLVED] Complex formula getting moer complex
    By Trebor777 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-02-2017, 01:39 PM
  3. [SOLVED] Use an existing cell formula for creating a new more complex formula
    By dubcap01 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-23-2014, 07:41 AM
  4. Replies: 4
    Last Post: 02-03-2014, 12:47 AM
  5. Assistance with reporting data inorder with no blank cells or rows inbetween
    By Ghost Of Casper in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-28-2013, 01:37 PM
  6. complex formula?
    By spinkung in forum Excel General
    Replies: 1
    Last Post: 12-22-2009, 05:20 AM
  7. I Need Help with complex formula ?
    By Dan Thompson in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-13-2005, 07:05 PM

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