Problem with index and match

mcva

New Member
Joined
Apr 20, 2020
Messages
37
Office Version
  1. 365
Platform
  1. Windows
Hi, I need to fill column V with the text that is in column AA if three conditions are matched: A=AA; $B$1=AB; J=AC. I have included some colors in the following figure to facilitate the analysis.
I have used the formula that is also shown in the figure however it is not working. What's the problem with my solution?
Thank you


Teste.jpg
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
if you are trying to match 3 critera with various column

index($AA$2:$AA$5, match( A2&B2&J2, $AD$2:$AD$5&$AB$2:$AB$5&$AC$2:$AC$5,0))
where the order of A2,B2,C2 MATCH the same order in the columns
A2 >> AD
B2 >> AB
C2 >> AC
 
Upvote 0
if you are trying to match 3 critera with various column

index($AA$2:$AA$5, match( A2&B2&J2, $AD$2:$AD$5&$AB$2:$AB$5&$AC$2:$AC$5,0))
where the order of A2,B2,C2 MATCH the same order in the columns
A2 >> AD
B2 >> AB
C2 >> AC
Your solution does not work. I don't understand why you have selected column AD
 
Upvote 0
it was just an example to show the order you can use the match - not necessarily on your data

i could not follow your question as posted by @jkpieterse
so was waiting for an answer to that question
A=AA; $B$1=AB; J=AC.

SO why B1 = AB ?????
as its just a header - perhaps hard code

index($AA$2:$AA$5, match( A2&$B$1&J2, $AA$2:$AA$5&$AB$2:$AB$5&$AC$2:$AC$5,0))

Note: Images are difficult to see , and also requires that I input all the data myself, which means I may make an error, which is very time consuming, and from my point of view less likely to get a response, if a complicated spreadsheet. Plus we cannot see any of the formulas used.

Therefore -

A good sample workbook has just 10-20 rows of representative data that has been desensitised. The sample layout accurately matches that of your real data. It also has expected results mocked up, worked examples where required, relevant cells highlighted and a few explanatory notes.

This will possibly enable a quicker and more accurate solution for you.

MrExcel has a tool called “XL2BB” that lets you post samples of your data and will allow us to copy/paste your sample data into our Excel spreadsheets, saving a lot of time.

You can also test to see if it works ok, in the "Test Here" forum.

OR if you cannot get XL2BB to work, or have restrictions on your PC

then put the sample spreadsheet onto a share

I only tend to goto OneDrive, Dropbox or google docs , as I'm never certain of other random share sites and possible virus.
Please make sure you have a representative data sample and also that the data has been desensitised, remember this site is open to anyone with internet access to see - so any sensitive / personal data should be removed

Make sure you set any share or google to share to everyone

if you have any issues with XL2BB, then the "About this Board" is the forum to ask questions about XL2BB
 
Upvote 0
it was just an example to show the order you can use the match - not necessarily on your data

i could not follow your question as posted by @jkpieterse
so was waiting for an answer to that question


SO why B1 = AB ?????
as its just a header - perhaps hard code

index($AA$2:$AA$5, match( A2&$B$1&J2, $AA$2:$AA$5&$AB$2:$AB$5&$AC$2:$AC$5,0))
B1 it's a header that matches the text in column AB. In the next step I will change B1 to D1, find the results, then D1 to E1 until J1
 
Upvote 0
B1 it's a header that matches the text in column AB. In the next step I will change B1 to D1, find the results, then D1 to E1 until J1
confused , not following

I assume
index($AA$2:$AA$5, match( A2&$B$1&J2, $AA$2:$AA$5&$AB$2:$AB$5&$AC$2:$AC$5,0))
did not work either
difficult for me to see and input ALL the data myself - so

can you explain further , give a sample as described , using xl2bb or a share and expected results with comments why
 
Upvote 1
Solution
B1 it's a header that matches the text in column AB. In the next step I will change B1 to D1, find the results, then D1 to E1 until J1
Your solution seems correct (index($AA$2:$AA$5, match( A2&$B$1&J2, $AA$2:$AA$5&$AB$2:$AB$5&$AC$2:$AC$5,0)), however it does not work....I already tried this, I don't know if the problem results from considering ($AA$2:$AA$5) in the index and then as a criteria...
 
Upvote 0
not really - works for a simple lookup
Just not sure on the Value
as if you are searching in column a and using various criteria it will return whatever the criteria is in A
so not sure what you are trying to do
it will just be a N/A error if ALL criteria is not matched - thats all i can see as a useful exercise - BUT maybe a COUNTIFS() would be better for that

Book4
ABCDEFG
1
2a2a1a
3b2
4c3
5a1
Sheet1
Cell Formulas
RangeFormula
G2G2=INDEX(A2:A5,MATCH(D2&E2,A2:A5&B2:B5,0))
 
Upvote 0
confused , not following

I assume
index($AA$2:$AA$5, match( A2&$B$1&J2, $AA$2:$AA$5&$AB$2:$AB$5&$AC$2:$AC$5,0))
did not work either
difficult for me to see and input ALL the data myself - so

can you explain further , give a sample as described , using xl2bb or a share and expected results with comments why
Its working thank you so much...
 
Upvote 0

Forum statistics

Threads
1,223,708
Messages
6,174,005
Members
452,542
Latest member
Bricklin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top