Match & Index with specific criteria

drewberts

Board Regular
Joined
Sep 5, 2013
Messages
177
Office Version
  1. 365
Platform
  1. Windows
I'll simplify the problem I'm having with an example.

I have 2 sheets the first (called CLIENTS) has FIRSTNAME, LASTNAME, COMPANY, TYPE, STATUS
The second (called JOBS) has FIRSTNAME, LASTNAME, COMPANY, TYPE, SITE, POSTCODE

The idea is that the first sheet is filled in with clients and in the STATUS column the answer is either YES or NO (I'm trying to differentiate between active and non active clients).
On the second sheet I complete the FIRSTNAME and LASTNAME and the COMPANY and TYPE columns are auto populated from the CLIENT sheet using:-

=INDEX(Clients!$C$8:$C$2300,MATCH($A1&$B1,Clients!$A$8:$A$2300&Clients!$B$8:$B$2300,0))
=INDEX(Clients!$D$8:$D$2300,MATCH($A1&$B1,Clients!$A$8:$A$2300&Clients!$B$8:$B$2300,0))

These both work fine. However what I wan't to introduce now is that they only auto-populate if the STATUS in the CLIENT sheet is set to YES.

Hope that makes sense.
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
Hi...

I took the liberty of rearranging your data on one sheet purely for the ease of demonstration purpose:

ABCDEFGHIJKLM
4CLIENTSJOBS
5FIRSTNAMELASTNAMECOMPANYTYPESTATUSFIRSTNAMELASTNAMECOMPANYTYPESITEPOSTCODE
6ADXC1YESAD
7BEYC2NOBE
8CFZC3YESCF

<tbody>
</tbody>

I entered the following array formulas to conditionally populate:

Company in J6

=IF(INDEX($F$6:$F$8,MATCH(H6&I6,$B$6:$B$8&$C$6:$C$8,0),1)="Yes",INDEX($D$6:$D$8,MATCH(H6&I6,$B$6:$B$8&$C$6:$C$8,0),1),"")

Type in J7

=IF(INDEX($F$6:$F$8,MATCH(H6&I6,$B$6:$B$8&$C$6:$C$8,0),1)="Yes",INDEX($E$6:$E$8,MATCH(H6&I6,$B$6:$B$8&$C$6:$C$8,0),1),"")

Hope this helps.
 
Upvote 0

Forum statistics

Threads
1,214,784
Messages
6,121,535
Members
449,037
Latest member
tmmotairi

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