Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11
Default Writing a macro to compare columns and return a value

Hello,

I am trying to write a macro to compare 2 columns and then return a
scpeficied value. Eventually, I will have approx 5000 lines to compare in the
columns, so I am trying to create a macro with a specified function that will
do thi, but can't figure out the function.

Here is what I want:
I want to see if the specificed EMO_ID Numb (for example, the number in cell
B7, whcih is 83) can be found anywhere in the BSNIP_ID column. If it it
found, then I want the number in cell B7 (which is #83) to be copied over to
the adjacent column (Numbers found), in cell C7. Can a macro be written to
search, find, numbers, and return a value for approx 5000 numbers?

BSNIP_ID EMO_ID Numb Numbers found
1 1
2 2
3 3
4 4
21 40
26 40
28 83
40 86
42 93
44 94
83 118
86 139
93 145
94 176
118 205
122 233
126 239
129 263
135 270


Thank you for your help!
--
Ginny
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
Writing a macro to hide columns based on cell value JAbels001 Excel Discussion (Misc queries) 2 April 16th 09 05:02 PM
If, Or function or macro to compare 3 columns of numbers AuthorizedUserPF Excel Worksheet Functions 3 October 27th 08 04:39 PM
How do I compare two columns and return a number count 9274211 Excel Worksheet Functions 2 August 6th 08 03:05 AM
Macro to compare two columns of data Odawg Excel Discussion (Misc queries) 1 October 12th 05 02:51 PM
Macro to compare two columns of data Odawg Excel Discussion (Misc queries) 0 October 12th 05 03:13 AM


All times are GMT +1. The time now is 12:30 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"