Use Index Match to fill in columns Sheet 1 based on data in Sheet 2

roba730

New Member
Joined
Apr 29, 2016
Messages
3
I have Sheet 1 with an account number in column a and column B-Y are different products that each account may own. I would like to have the sheet filled out as seen below. I think I will be able to fill in the X's using Index Match.

Account#BCDEFGHIJKLMNOPQRSTUVWXYZ
14331937

<tbody>
</tbody>
xxxx
14346609

<tbody>
</tbody>
xxxxxx

<tbody>
</tbody>





I have a second sheet in which each row contains an account number in Column A and a product they own in Column B. Each account number may own multiple products which will be found on multiple rows.

AB
Account#Product
14331937C
14331937R
14331937F
14331937Z
14346609

<tbody>
</tbody>
B
14346609

<tbody>
</tbody>
J
14346609

<tbody>
</tbody>
N
14346609

<tbody>
</tbody>
R
14346609

<tbody>
</tbody>
T
14346609W

<tbody>
</tbody>
I have never used Index Match.

Thanks in Advance for your help.
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
You could use the following formula in sheet 1 cell B2... copy over to Z2 and down...

=IF(SUMPRODUCT((Sheet2!$A$3:$A$12=Sheet1!$A2)*(Sheet2!$B$3:$B$12=Sheet1!B$1)),"x","")

Good luck,
CN.
 
Upvote 0
You could use the following formula in sheet 1 cell B2... copy over to Z2 and down...

=IF(SUMPRODUCT((Sheet2!$A$3:$A$12=Sheet1!$A2)*(Sheet2!$B$3:$B$12=Sheet1!B$1)),"x","")

Good luck,
CN.

Thank you CN this works.

To help me understand how it does work I have a question; does the * in the formula mean AND or MULTIPLY?

Thx again, Rob
 
Upvote 0
To help me understand how it does work I have a question; does the * in the formula mean AND or MULTIPLY?

Well, that depends on how you look at it...

The sumproduct formula is special because it handles arrays.
The first part (Sheet2!$A$3:$A$12=Sheet1!$A2) results in Nine Trues or Falses.
The second part (Sheet2!$B$3:$B$12=Sheet1!B$1)) also results in 9 Trues or Falses.

The * literally means multiply... so we multiply an array of 9 trues or falses against another array of 9 trues or falses... this action turns into an array of 1's or 0's....
IE {True, True, False, False}*{True, False, True, False} would = {1, 0, 0, 0}
So in essence, you can think of it as an AND ... so TRUE AND TRUE would be 1, but TRUE AND FALSE, FALSE AND FALSE, or FALSE AND TRUE would all = 0...

The answer is, you can think of it both ways ... It does mean "AND"... it also does mean Multiply

Hope that hasn't made this more confusing...

CN.
 
Upvote 0
Hi,
Can you use something like this?
Mike Szczesny


Excel 2012
ABCDEFGH
1abcdefg
2ixxxx
3iixxx
4
5
6ib
7d
8e
9f
Sheet1
Cell Formulas
RangeFormula
B6{=INDEX($B$1:$H$1,SMALL(IF($A$2:$A$3=$A$6,IF($B$2:$H$3="x",COLUMN($B$1:$H$1)-COLUMN($B$1)+1)),ROWS($B$6:B6)))}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0

Forum statistics

Threads
1,214,889
Messages
6,122,097
Members
449,065
Latest member
albertocarrillom

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