View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
ryguy7272 ryguy7272 is offline
external usenet poster
 
Posts: 2,836
Default Checking values in 2 columns

This macro will do what you want:
Sub Different()
Dim i As Integer

For i = 2 To 50
If Worksheets("Check Number in Column").Cells(i, 1) = Worksheets("Check
Number in Column").Cells(i, 2) Then
Worksheets("Check Number in Column").Cells(i, 3) = ""
Else
Worksheets("Check Number in Column").Cells(i, 3) = "Different"
End If
Next i
End Sub

Make sure your sheet is named appropriately...

Regards,
Ryan---

--
RyGuy


"Rick Rothstein (MVP - VB)" wrote:

This looks like it works...

=MID("NY",1+ISNUMBER(MATCH(A1,B:B,0)),1)

Rick


"BRob" wrote in message
...
I want to check a group of random integers in column A to see if there is
an equivalent value in column B (again random). I want to put the result in
column C. (eg Yes or No).

eg

A B C

1 5 Y
11 6 N
5 1 Y
5 5 Y


Can SKS help please


TIA


Rob


ps Apols if this is a double post - the first seems to have got lost
somewhere