+ Reply to Thread
Results 1 to 18 of 18

Match Or Formulae Problem

  1. #1
    Forum Contributor
    Join Date
    10-20-2017
    Location
    London
    MS-Off Ver
    2016
    Posts
    108

    Match Or Formulae Problem

    I have 2 lists.
    In these lists, it will either say apple or avacado but never both in the same list.
    I need to match where it says apple or avacado.

    I need this for work. Please help.
    Attached Files Attached Files

  2. #2
    Forum Expert kersplash's Avatar
    Join Date
    11-22-2016
    Location
    Perth
    MS-Off Ver
    Home 2016 (Windows 10)/Work 2013 Pro Plus (Windows 10)
    Posts
    2,012

    Re: Match Or Formulae Problem

    If List1 has apples and List2 has avocados as per your example but they are on different rows what should the result be?

    ie. At the moment both the results end up being 3, what if they both appear in the lists but on different rows?

  3. #3
    Forum Contributor
    Join Date
    10-20-2017
    Location
    London
    MS-Off Ver
    2016
    Posts
    108

    Re: Match Or Formulae Problem

    Hi,

    I need it to return the row number of the item.

    So if apples is in row 3, I need match top return 3.
    If Avacados is in row 5, I need it return 5.

    The row number will change but the list will never have both apples and avacados.
    it will always be either Apples or Avacados.
    The entry will be unique as well, there will never be more than 1 entry for apple or avocado so I only need to return the row number for the 1st result.

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

    Re: Match Or Formulae Problem

    This formula will MATCH the two words on same row:

    =MATCH("avacado",IF($A$2:$A$6="apples",$C$2:$C$6,""),0)
    Quang PT

  5. #5
    Forum Expert
    Join Date
    11-26-2013
    Location
    Colac, Victoria, Australia
    MS-Off Ver
    Excel 2016
    Posts
    1,309

    Re: Match Or Formulae Problem

    I am confused by your question, but I think you want to be able to search for either of the fruit from the list.

    One possibility is =IFERROR(MATCH(B15,A2:A6,0),0)+IFERROR(MATCH(B18,A2:A6,0),0)

    Perhaps you can clarify what you are trying to achieve.

    I hope this helps, please let me know!

    Regards,

    David

    If this has been helpful
    - Please click on the *Add Reputation button at the bottom left.

    Please mark your thread as SOLVED:
    - Click Thread Tools above your first post, select "Mark your thread as Solved".


  6. #6
    Forum Expert kersplash's Avatar
    Join Date
    11-22-2016
    Location
    Perth
    MS-Off Ver
    Home 2016 (Windows 10)/Work 2013 Pro Plus (Windows 10)
    Posts
    2,012

    Re: Match Or Formulae Problem

    =IF(MATCH(B15,A2:A6)>0,MATCH(B15,A2:A6,0),IF(MATCH(B18,C2:C6)>0,MATCH(B18,C2:C6,0),"no match"))

  7. #7
    Forum Contributor
    Join Date
    10-20-2017
    Location
    London
    MS-Off Ver
    2016
    Posts
    108

    Re: Match Or Formulae Problem

    Hi,

    Sorry, I didn't explain my issue properly.

    There will only ever be 1 list and not 2.

    On that list, there will be either apples or avacados.
    It will be a unique item and there will be no duplicates.
    I need to match either apples or avacados in this 1 list to identify the row number.

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

    Re: Match Or Formulae Problem

    Look like you want to MATCH one each other in range:

    =MIN(IFERROR(MATCH({"apples","avacado"},$A$2:$A$6,0),""))

  9. #9
    Forum Contributor
    Join Date
    10-20-2017
    Location
    London
    MS-Off Ver
    2016
    Posts
    108

    Re: Match Or Formulae Problem

    Thanks. This works.

    What I am trying to do is return a cell reference based on this so what I am actually doing is the below.

    cell(index(match(

    I was hoping to return this cell reference by somehow doing a:

    cell(index(match(or

    but this isn't possible.

    I can use the formulae you provided but it makes the complete formulae longer than I hoped.
    Is there any alternative way?

  10. #10
    Forum Contributor
    Join Date
    10-20-2017
    Location
    London
    MS-Off Ver
    2016
    Posts
    108

    Re: Match Or Formulae Problem

    Hi Bob,

    This is perfect but I have 1 last issue.
    Instead of using array constants as you have done in the example below, is it possible to do this based on cell values.
    For example, if cell D1 had apples and E1 had avacados?

    =MIN(IFERROR(MATCH({"apples","avacado"},$A$2:$A$6,0),""))

  11. #11
    Forum Contributor
    Join Date
    10-20-2017
    Location
    London
    MS-Off Ver
    2016
    Posts
    108

    Re: Match Or Formulae Problem

    Also, I understand most of this but why use the min function?
    Last edited by AliGW; 11-01-2017 at 02:18 AM. Reason: Unnecessary quotation removed.

  12. #12
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    82,386

    Re: Match Or Formulae Problem

    Do you have your list of search items in an array somewhere on your spreadsheet?

    If so, try this:

    =MIN(IFERROR(MATCH($B$1:$B$2,$A$2:$A$6,0),""))

    ... 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.

    $B$1:$B$2 contains your seach values.
    Last edited by AliGW; 11-01-2017 at 02:20 AM.
    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.

  13. #13
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    82,386

    Re: Match Or Formulae Problem

    Quote Originally Posted by eazy899 View Post
    Also, I understand most of this but why use the min function?
    It won't find anything but the first item in the array without it.

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

    Re: Match Or Formulae Problem

    Quote Originally Posted by eazy899 View Post
    Thanks. This works.

    What I am trying to do is return a cell reference based on this so what I am actually doing is the below.

    cell(index(match(

    I was hoping to return this cell reference by somehow doing a:

    cell(index(match(or

    but this isn't possible.

    I can use the formulae you provided but it makes the complete formulae longer than I hoped.
    Is there any alternative way?
    To spell the address:
    ="A"&MIN(IFERROR(MATCH({"apples","avacado"},$A:$A,0),""))
    To access to the cell:
    =INDIRECT("A"&MIN(IFERROR(MATCH({"apples","avacado"},$A:$A,0),"")))

    Replace the name with cell adress that contain the name.

  15. #15
    Forum Contributor
    Join Date
    10-20-2017
    Location
    London
    MS-Off Ver
    2016
    Posts
    108

    Re: Match Or Formulae Problem

    Quote Originally Posted by AliGW View Post
    It won't find anything but the first item in the array without it.
    Thanks, I will take a look at this when I get into work today.

    Similar question though, why use the min function in this?
    I am trying to return a cell reference based on a list of unique items that may be in a row with this by the way.

  16. #16
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    82,386

    Re: Match Or Formulae Problem

    Did you try my suggestion in post #12?

    I have explained why you need to use the MIN function. Use the evaluate formula function to see how it works.

  17. #17
    Forum Contributor
    Join Date
    10-20-2017
    Location
    London
    MS-Off Ver
    2016
    Posts
    108

    Re: Match Or Formulae Problem

    Quote Originally Posted by AliGW View Post
    Did you try my suggestion in post #12?

    I have explained why you need to use the MIN function. Use the evaluate formula function to see how it works.
    Hi,

    Sorry I must have missed that. I have not gotten around to trying it yet as I am getting ready for work.
    I will try it once I get in.

    Thanks again for all the help and sorry that I have delay trying the solution until I am in the office.

  18. #18
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    82,386

    Re: Match Or Formulae Problem

    That's OK - I am getting ready for work, too. Let us know how you get on.

+ 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. Help needed with formulae/coding
    By Jose22 in forum Excel General
    Replies: 1
    Last Post: 01-22-2014, 01:24 PM
  2. [SOLVED] Formulae to match two columns and comparetwo others
    By BHurter in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-05-2012, 05:19 AM
  3. Problem with if formulae
    By carrach in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-15-2010, 04:48 AM
  4. Match Formulae
    By shekar goud in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-06-2010, 08:40 AM
  5. Data match formulae
    By BUSJEDWA in forum Excel General
    Replies: 2
    Last Post: 05-22-2008, 07:03 AM
  6. Problem with IF formulae!!!
    By tallpaul in forum Excel General
    Replies: 4
    Last Post: 10-27-2006, 12:02 PM
  7. formulae problem:HELP
    By stevenmorrison in forum Excel General
    Replies: 1
    Last Post: 08-11-2005, 12:05 PM
  8. [SOLVED] Array Formulae Problem
    By Neil P in forum Excel General
    Replies: 2
    Last Post: 07-25-2005, 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