Sub match()
For a = 1 To 5
For b = 1 To 10
If Worksheets("Sheet1").Cells(a, 1) = Worksheets("Sheet2").Cells(b, 2)
Then
Worksheets("Sheet1").Cells(a, 2) = "Y"
End If
Next b
If Worksheets("Sheet1").Cells(a, 2) = "" Then
Worksheets("Sheet1").Cells(a, 2) = "N"
End If
Next a
End Sub
--
Ian
--
"Jana" <Bauer...@gmail.com> wrote in message
news:1127412256.7...@g44g2000cwa.googlegroups.com...
B2: =IF(ISNA(MATCH(A2,Sheet2!B:B,0)),"N","Y")
You might also want to look at VLOOKUP if you are planning to include
other fields from another sheet.
http://www.mvps.org/dmcritchie/excel/vlookup.htm
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm
"Jana" <Bauer...@gmail.com> wrote in message news:1127412256.7...@g44g2000cwa.googlegroups.com...
Jana
"Jana" <Bauer...@gmail.com> wrote in message news:1127416320.4...@g47g2000cwa.googlegroups.com...