+ Reply to Thread
Results 1 to 7 of 7

Using array formula with if and or

  1. #1
    Registered User
    Join Date
    08-03-2015
    Location
    Peterborough
    MS-Off Ver
    Excel 2007
    Posts
    26

    Using array formula with if and or

    Hi,

    I've got a spreadsheet where we put in product data for a number of different products, labelled a, b and c for ease.

    Now as part of our process control I want to be easily able to see the last 10 moisture results of a certain product in a graph.

    So I can do this with =IFERROR(INDEX(Process!I:I,LARGE(IF(Process!E:E="A",ROW(Process!I:I)),ROWS($1:1))),"") and just change the rows down to 10. I can then plot this as a graph and easily see the last 10 data points of product a

    Now one of our two products are very similar and our infrequently made so it makes sense for us to combine them b and C

    So I think I need to use an or function in that so that it picks either the last incident of B or C. Now I've tried this multiple times and the best outcome I've got is a zero.

    What I wanting is for excel to look up the last 10 incidents where there has been a B or C in column E and the moisture results in column I.

    Any help will be greatly appreciated.
    Attached Files Attached Files
    Last edited by Howlin; 12-18-2015 at 04:52 AM.

  2. #2
    Forum Contributor
    Join Date
    02-07-2013
    Location
    Karachi, Pakistan
    MS-Off Ver
    Excel 2007
    Posts
    290

    Re: Using array formula with if and or

    Hi Howlin,

    I am not 100% sure is that you're looking for:

    In Moisture sheet A23:
    =INDEX(Process!$A$2:$A$9999,MATCH(LARGE(IF(OR(Process!$E$2:$E$9999={"B","C"}),Process!$A$2:$A$9999),ROW(A1)),Process!$A$2:$A$9999,0))

    To be confirmed with Ctrl+Shift+Enter
    copy down...

    Blessing

  3. #3
    Registered User
    Join Date
    08-03-2015
    Location
    Peterborough
    MS-Off Ver
    Excel 2007
    Posts
    26

    Re: Using array formula with if and or

    Hi,

    That's not giving the outcome I'd expect. :S

    Seems to be finding the highest values.

    I've update the spreadsheet here.

    On Sheet excel query 6 response in Cell D40-D49, E40-E49 there is the expected dates and the Expected moistures.

    A better explanation of what I'm trying to do is filter by product code B/C and then just pick the last 10 data points.

    Cheers,

    Tom
    Attached Files Attached Files

  4. #4
    Forum Contributor
    Join Date
    02-07-2013
    Location
    Karachi, Pakistan
    MS-Off Ver
    Excel 2007
    Posts
    290

    Re: Using array formula with if and or

    Hi Tom,
    Sorry I wasn't sure 100% as mentioned in first post.

    It may required vba, I am not sure, hope someone will update you.

    Regards,

  5. #5
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,169

    Re: Using array formula with if and or

    Hi Tom,

    It seems to me there should be a way to do this problem using Pivot Tables. Pivots can filter the B and C to only show. If your example had lots of dates then using a "Date After" in the pivot would also work. See the attached for a quick guess at what you might need.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  6. #6
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,481

    Re: Using array formula with if and or

    Maybe:

    D40:

    Please Login or Register  to view this content.
    E40:

    Please Login or Register  to view this content.
    Confirmed with CSE

    Drag both down
    Quang PT

  7. #7
    Registered User
    Join Date
    08-03-2015
    Location
    Peterborough
    MS-Off Ver
    Excel 2007
    Posts
    26

    Re: Using array formula with if and or

    Thanks guys,

    I got it with bebo021999. Thanks for your help guys.

    Cheers,

    Tom

+ 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. Question about using Evaluate with an array of formulas not an array formula
    By Mr_Bill in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-19-2014, 03:26 PM
  2. Can I make the row lookup array/range part in an array formula variable?
    By OLLY-7 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-18-2014, 09:06 AM
  3. Array formula + Array formula with criteria that lookups a Table
    By anrichards22 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-16-2013, 11:41 AM
  4. Typing an array into a formula rather than referring to an array of cells
    By Cookstein2 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-03-2013, 12:59 PM
  5. Replace hard coded array in formula with link to input array
    By David Brown in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 01-08-2011, 07:45 AM
  6. Converting 3x10 array to a 1X30 array to run a Match formula
    By NBVC in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 04-08-2009, 07:45 AM
  7. [SOLVED] Tricky array formula issue - Using array formula on one cell, then autofilling down a range
    By aspenbordr in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-27-2005, 11:05 AM

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