Search // Append // Review & Notify.

Habu

New Member
Joined
Nov 10, 2004
Messages
13
I have a listing of data (see below). This data is much larger than what I have posted but I posted this as an example.

Column A Column B
Row
1 040 54481
2 064 54703
3 070 54911
4 072 55025
5 550 55033
6 55044
7 55057
8 55068

What I need is a special search and notification that will do the following. I need it to only look at the first three (3) digits for the list of numbers in Column B, then compair them against the three (3) numbers in Column A.

So that if/when there is a match with Column A I will get the following results.

Column A Column B Column C
Row
1 040 54481 No
2 064 54703 No
3 070 54911 No
4 072 55025 No
5 550 55033 Yes
6 55044 Yes
7 55057 Yes
8 55068 Yes
9 04088 Yes
10 06499 Yes
11 07299 Yes

Thankx,
Habu (y)
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off

martinee

Well-known Member
Joined
Nov 4, 2003
Messages
960
Give this a go:
Code:
Sub tt()
Dim c As Range, rng As Range

Set rng = Range("A2:A" & Range("A65536").End(xlUp).Row)
For Each c In rng
If Format(c.Value, "###") = Format(Left(c.Offset(0, 1).Value, Len(c.Value)), "###") _
            Or c.Offset(0, 1).Value = "" Then
    c.Offset(0, 2).Value = "YES"
Else
    c.Offset(0, 2).Value = "No"
End If
Next c

End Sub
HTH.
 

Forum statistics

Threads
1,147,508
Messages
5,741,568
Members
423,667
Latest member
Kai_357

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
Top