Check if value matches in a range

suzeet

New Member
Joined
Oct 8, 2018
Messages
3
Hi,
I want to match the column on a range. Suppose as in the example below, for the Sq No 1, if the Address column of first four rows (where Sq No = 1), I want to put a "YES" if matched, in the Match column

[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Sq No[/TD]
[TD]ID[/TD]
[TD]Address[/TD]
[TD]Match[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD="align: center"]1500946[/TD]
[TD][TABLE="width: 308"]
<tbody>[TR]
[TD="class: xl65, width: 308"]3410 WORTH ST[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]YES[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]1500946[/TD]
[TD][TABLE="width: 308"]
<tbody>[TR]
[TD="class: xl65, width: 308"]3500 GASTON AVE[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]1500946[/TD]
[TD][TABLE="width: 308"]
<tbody>[TR]
[TD="class: xl65, width: 308"]6401 MAPLE AVE APT 1203[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD][TABLE="width: 64"]
<tbody>[TR]
[TD="class: xl65, width: 64, align: right"]3312005[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 308"]
<tbody>[TR]
[TD="class: xl65, width: 308"]3410 WORTH ST[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]YES[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]590851[/TD]
[TD][TABLE="width: 308"]
<tbody>[TR]
[TD="class: xl65, width: 308"]3410 WORTH ST[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]590851[/TD]
[TD][TABLE="width: 308"]
<tbody>[TR]
[TD="class: xl65, width: 308"]530 CLARA BARTON BLVD[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD][TABLE="width: 64"]
<tbody>[TR]
[TD="class: xl65, width: 64, align: right"]590851[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 308"]
<tbody>[TR]
[TD="class: xl65, width: 308"]TOPA[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD][TABLE="width: 64"]
<tbody>[TR]
[TD="class: xl65, width: 64, align: right"]3312027[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 308"]
<tbody>[TR]
[TD="class: xl65, width: 308"]3415 WORTH ST[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD][TABLE="width: 64"]
<tbody>[TR]
[TD="class: xl65, width: 64, align: right"]1469183[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 308"]
<tbody>[TR]
[TD="class: xl65, width: 308"]144 PINE MEADOWS LN[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]YES[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD][TABLE="width: 64"]
<tbody>[TR]
[TD="class: xl65, width: 64, align: right"]3312034[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 308"]
<tbody>[TR]
[TD="class: xl65, width: 308"]144 PINE MEADOWS LN[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]YES[/TD]
[/TR]
</tbody>[/TABLE]
 

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.
How about this?

=IF(COUNTIFS(A$1:A$10,A1,C$1:C$10,C1)=2,"YES","")

Works fine on your sample data

BUT

make sure you test it on lots of other data as I'm not sure it's totally correct.

But it does work on your data.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,177
Members
453,021
Latest member
Justyna P

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