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.
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.
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?
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.
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
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".
=IF(MATCH(B15,A2:A6)>0,MATCH(B15,A2:A6,0),IF(MATCH(B18,C2:C6)>0,MATCH(B18,C2:C6,0),"no match"))
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.
Look like you want to MATCH one each other in range:
=MIN(IFERROR(MATCH({"apples","avacado"},$A$2:$A$6,0),""))
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?
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),""))
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.
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.
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.
That's OK - I am getting ready for work, too. Let us know how you get on.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks