Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 24
Default Checking values in 2 columns

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


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,480
Default Checking values in 2 columns

Hi Rob

=IF(B1="","",IF(COUNTIF(A:A,B1),"Y","N"))
Copy down as required

--
Regards
Roger Govier

"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


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default Checking values in 2 columns

Hi,

Put this in C1 and drag down. Alter the range to suit.

=IF(ISERROR(MATCH(A1,$B$1:$B$4,0)),"N","Y")

Mike

"BRob" wrote:

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



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Checking values in 2 columns

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



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
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




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Checking for exsitence of values in a different worksheet Dirk_Bob Excel Discussion (Misc queries) 2 September 28th 06 10:45 PM
Checking for Multiple Values guilbj2 Excel Discussion (Misc queries) 8 February 27th 06 08:02 PM
Checking for a zero value in multiple columns johnsoned Excel Worksheet Functions 2 December 15th 05 12:25 AM
Checking on two values Johannes B. Excel Discussion (Misc queries) 4 April 22nd 05 06:49 PM
Checking ALL values in a range nospaminlich Excel Discussion (Misc queries) 13 February 10th 05 09:29 AM


All times are GMT +1. The time now is 09:57 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"