my_account
New Member
- Joined
- Mar 9, 2019
- Messages
- 1
Hi All,
I am trying to compare two tables of having varied rows and columns. I want to see if values in table 1 matches with data in table 2. I am using index and match formula. I am checking each cell in table 1 with table 2 data set.
However I am getting 'no match' everytime. Can anyone please provide right formula.
=IF(ISNA(INDEX(table2_data,MATCH(a2,table2_data,0))),"No Match",a2)
Table A - Sheet 1
[TABLE="width: 500"]
<tbody>[TR]
[TD]
a
[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]b[/TD]
[TD][TABLE="width: 65"]
<tbody>[TR]
[TD="class: xl65, width: 65"]Jan 01, 1900[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 65"]
<tbody>[TR]
[TD="class: xl65"]Jan 01, 1900[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 65"]
<tbody>[TR]
[TD="class: xl65"]Jan 11, 1900[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 65"]
<tbody>[TR]
[TD="class: xl65"]Jan 01, 1900[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD]c[/TD]
[TD]Bond[/TD]
[TD]Note[/TD]
[TD]Bill[/TD]
[TD]Bill[/TD]
[/TR]
[TR]
[TD]d[/TD]
[TD]Street[/TD]
[TD]Market[/TD]
[TD]Market[/TD]
[TD]Market[/TD]
[/TR]
[TR]
[TD]e[/TD]
[TD]Private[/TD]
[TD]Public[/TD]
[TD]Govt[/TD]
[TD]School[/TD]
[/TR]
</tbody>[/TABLE]
Table B - Sheet 2 ( number of rows and columns could be different than table 1)
[TABLE="width: 500"]
<tbody>[TR]
[TD]
a
[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]b[/TD]
[TD][TABLE="width: 65"]
<tbody>[TR]
[TD="class: xl65, width: 65"]Jan 05, 1900[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 65"]
<tbody>[TR]
[TD="class: xl65"]Jan 01, 1900[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 65"]
<tbody>[TR]
[TD="class: xl65"]Jan 10, 1900[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 65"]
<tbody>[TR]
[TD="class: xl65"]Jan 11, 1900[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD]c[/TD]
[TD]Bond_1[/TD]
[TD]Bond[/TD]
[TD]Bill[/TD]
[TD]Bill_2[/TD]
[/TR]
[TR]
[TD]d[/TD]
[TD]Street[/TD]
[TD]Market[/TD]
[TD]Market[/TD]
[TD]Market[/TD]
[/TR]
[TR]
[TD]e[/TD]
[TD]Private[/TD]
[TD]Public[/TD]
[TD]Govt_5[/TD]
[TD]School_9
[/TD]
[/TR]
</tbody>[/TABLE]
Required Output
[TABLE="width: 500"]
<tbody>[TR]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]No Match[/TD]
[TD][TABLE="width: 65"]
<tbody>[TR]
[TD="class: xl65"]Jan 01, 1900[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 65"]
<tbody>[TR]
[TD="class: xl65"]Jan 11, 1900[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]Jan 01, 1900[/TD]
[/TR]
[TR]
[TD]
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
I am trying to compare two tables of having varied rows and columns. I want to see if values in table 1 matches with data in table 2. I am using index and match formula. I am checking each cell in table 1 with table 2 data set.
However I am getting 'no match' everytime. Can anyone please provide right formula.
=IF(ISNA(INDEX(table2_data,MATCH(a2,table2_data,0))),"No Match",a2)
Table A - Sheet 1
[TABLE="width: 500"]
<tbody>[TR]
[TD]
a
[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]b[/TD]
[TD][TABLE="width: 65"]
<tbody>[TR]
[TD="class: xl65, width: 65"]Jan 01, 1900[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 65"]
<tbody>[TR]
[TD="class: xl65"]Jan 01, 1900[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 65"]
<tbody>[TR]
[TD="class: xl65"]Jan 11, 1900[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 65"]
<tbody>[TR]
[TD="class: xl65"]Jan 01, 1900[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD]c[/TD]
[TD]Bond[/TD]
[TD]Note[/TD]
[TD]Bill[/TD]
[TD]Bill[/TD]
[/TR]
[TR]
[TD]d[/TD]
[TD]Street[/TD]
[TD]Market[/TD]
[TD]Market[/TD]
[TD]Market[/TD]
[/TR]
[TR]
[TD]e[/TD]
[TD]Private[/TD]
[TD]Public[/TD]
[TD]Govt[/TD]
[TD]School[/TD]
[/TR]
</tbody>[/TABLE]
Table B - Sheet 2 ( number of rows and columns could be different than table 1)
[TABLE="width: 500"]
<tbody>[TR]
[TD]
a
[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]b[/TD]
[TD][TABLE="width: 65"]
<tbody>[TR]
[TD="class: xl65, width: 65"]Jan 05, 1900[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 65"]
<tbody>[TR]
[TD="class: xl65"]Jan 01, 1900[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 65"]
<tbody>[TR]
[TD="class: xl65"]Jan 10, 1900[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 65"]
<tbody>[TR]
[TD="class: xl65"]Jan 11, 1900[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD]c[/TD]
[TD]Bond_1[/TD]
[TD]Bond[/TD]
[TD]Bill[/TD]
[TD]Bill_2[/TD]
[/TR]
[TR]
[TD]d[/TD]
[TD]Street[/TD]
[TD]Market[/TD]
[TD]Market[/TD]
[TD]Market[/TD]
[/TR]
[TR]
[TD]e[/TD]
[TD]Private[/TD]
[TD]Public[/TD]
[TD]Govt_5[/TD]
[TD]School_9
[/TD]
[/TR]
</tbody>[/TABLE]
Required Output
[TABLE="width: 500"]
<tbody>[TR]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]No Match[/TD]
[TD][TABLE="width: 65"]
<tbody>[TR]
[TD="class: xl65"]Jan 01, 1900[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 65"]
<tbody>[TR]
[TD="class: xl65"]Jan 11, 1900[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]Jan 01, 1900[/TD]
[/TR]
[TR]
[TD]
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]